Received: from mailhost.rdg.ac.uk (IDENT:exim@sumh1.rdg.ac.uk [134.225.16.4]) by hub.org (8.9.3/8.9.3) with ESMTP id LAA42095 for ; Thu, 13 Apr 2000 11:54:01 -0400 (EDT) (envelope-from a.c.r.martin@reading.ac.uk) Received: from sapc13 ([134.225.167.27] helo=sapc13.rdg.ac.uk) by mailhost.rdg.ac.uk with esmtp (University of Reading Email Service) id {12flwN-00077i-00} for pgsql-sql@postgresql.org; Thu, 13 Apr 2000 16:53:59 +0100 Received: from localhost (localhost [[UNIX: localhost]]) by sapc13.rdg.ac.uk (8.9.3/8.9.3) id QAA17057 for pgsql-sql@postgresql.org; Thu, 13 Apr 2000 16:54:04 +0100 From: "Andrew C.R. Martin" To: pgsql-sql@postgresql.org Subject: Re: GROUP BY / HAVING - am I being thick? Date: Thu, 13 Apr 2000 16:52:12 +0100 X-Mailer: KMail [version 1.0.20] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00041316540301.04663@sapc13.rdg.ac.uk> Content-Transfer-Encoding: 8bit X-Archive-Number: 200004/146 > I have a question about GROUP BY / HAVING. It seems I can't do > something I *think* I should be able to do! [...] > SELECT codon, sum(nexamples) > FROM summary > WHERE expl = 'f' > GROUP BY codon > HAVING expl = 'f'; OK! As I thought, I was being thick - helps to read the book properly instead of dipping into it. Thanks Tom for clearing this up! Andrew -- Dr. Andrew C.R. Martin EMail: a.c.r.martin@reading.ac.uk (work) Lecturer in Bioinformatics andrew@stagleys.demon.co.uk (home) University of Reading Tel.: +44 (0)118 987 5123x7022 Fax: +44 (0)118 931 0180