From: Josh Berkus <josh@agliodbs.com>
To: Joseph Shraibman <jks@selectacast.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: WHERE on an alias
Date: Fri, 24 Aug 2001 13:43:21 -0700
Message-ID: <web-108012@davinci.ethosmedia.com> (raw)
In-Reply-To: <3B86B6AA.3020309@selectacast.net>
Joseph,
> playpen=# SELECT a, sum(b) as dsum
> playpen-# FROM taba
> playpen-# GROUP BY a
> playpen-# HAVING dsum > 5;
Sorry, my mistake:
SELECT a, sum(b) as dsum
FROM taba
GROUP BY a
HAVING sum(b) > 5;
I had the impression that aliases for aggregates were allowed in
Postgres HAVING clauses. Apparently not.
-Josh
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
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: josh@agliodbs.com, jks@selectacast.net
Subject: Re: WHERE on an alias
In-Reply-To: <web-108012@davinci.ethosmedia.com>
* 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