From: Iain <iain@mst.co.jp>
To: pgsql-sql@postgresql.org
Subject: invalid 'having' clause
Date: Thu, 2 Dec 2004 11:22:56 +0900
Message-ID: <001601c4d815$d8f03430$7201a8c0@mst1x5r347kymb> (raw)
Hi,
Just a quick question out of curiosity, I was just wondering if this is
supposed to be valid sql:
select count(*) as cnt
from sometable
group by somecolumn
having cnt > 1
This isn't valid in pg (7.4.6), but this is:
select count(*)
from sometable
group by somecolumn
having count(*) > 1
Does anyone have any idea?
I can't remember what other databases do, and I'm not so familiar with the
standards, but I just thought I'd mention it anyway.
regards
Iain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: iain@mst.co.jp
Subject: Re: invalid 'having' clause
In-Reply-To: <001601c4d815$d8f03430$7201a8c0@mst1x5r347kymb>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox