From: Rick Schumeyer <rschumeyer@ieee.org>
To: pgsql-sql@postgresql.org
Subject: pg, mysql comparison with "group by" clause
Date: Tue, 11 Oct 2005 17:12:20 -0400
Message-ID: <001001c5cea8$77cabc90$0300a8c0@dell8200> (raw)
In-Reply-To: <13793.1129039438@sss.pgh.pa.us>
I'm not sure what I was thinking, but I tried the following query in pg:
SELECT * FROM t GROUP BY state;
pg returns an error.
Mysql, OTOH, returns the first row for each state. (The first row with
"AK", the first row with "PA", etc.)
I'm no SQL expert, but it seems to me that the pg behavior is correct, and
the mysql result is just weird. Am I correct?
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: rschumeyer@ieee.org
Subject: Re: pg, mysql comparison with "group by" clause
In-Reply-To: <001001c5cea8$77cabc90$0300a8c0@dell8200>
* 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