Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 61345475B33 for ; Fri, 20 Dec 2002 10:55:27 -0500 (EST) Received: from acheron.rime.com.au (unknown [203.208.66.49]) by postgresql.org (Postfix) with ESMTP id A6AA0475AEC for ; Fri, 20 Dec 2002 10:55:26 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by acheron.rime.com.au (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id 684D55457F; Sat, 21 Dec 2002 02:55:30 +1100 (EST) Received: by acheron.rime.com.au (Postfix on SuSE Linux 8.0 (i386), from userid 527) id 67FF454580; Sat, 21 Dec 2002 02:55:29 +1100 (EST) Received: from hephaestus.rhyme.com.au (unknown [203.8.195.124]) by acheron.rime.com.au (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id E169C5457F; Sat, 21 Dec 2002 02:55:28 +1100 (EST) Message-Id: <5.1.0.14.0.20021221025235.03c5c490@mail.rhyme.com.au> X-Sender: pjw@mail.rhyme.com.au X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 21 Dec 2002 02:53:25 +1100 To: Gary Stainburn , pgsql-sql@postgresql.org From: Philip Warner Subject: Re: Help on (sub)-select In-Reply-To: <200212201148.24013.gary.stainburn@ringways.co.uk> References: <5.1.0.14.0.20021220214822.02d7e360@mail.rhyme.com.au> <5.1.0.14.0.20021220214822.02d7e360@mail.rhyme.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Status: No, hits=-3.1 required=8.5 tests=IN_REP_TO,WEIRD_PORT version=2.31 X-Spam-Level: X-Virus-Scanned: by AMaViS 0.3.12pre8 X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/248 X-Sequence-Number: 10836 At 11:48 AM 20/12/2002 +0000, Gary Stainburn wrote: > > select r.*, count(*) from roster r, roster_staff s > > where rsdate = rodate and rsgid = rogid and rsgsid = rogid > > group by r.* > >This one came up with a parser error near '*' but I don't understand it >enough >to debug it. Replace the two occurrences of r.* with the list of fields in r that you want to group the count by. ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 03 5330 3172 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/