Re: SELECT, GROUP BY, and aggregates - Mailing list pgsql-general

From Jeff Janes
Subject Re: SELECT, GROUP BY, and aggregates
Date
Msg-id CAMkU=1yonuNjGhVkMCMfEQfcQF3Guo3YfmeFodaUcKdEN2y5qQ@mail.gmail.com
Whole thread Raw
In response to Re: SELECT, GROUP BY, and aggregates  (Bill Moran <wmoran@potentialtech.com>)
Responses Re: SELECT, GROUP BY, and aggregates  (Bill Moran <wmoran@potentialtech.com>)
Re: SELECT, GROUP BY, and aggregates  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
On Fri, Feb 13, 2015 at 10:26 AM, Bill Moran <wmoran@potentialtech.com> wrote:

> Ryan Delaney <ryan.delaney@gmail.com> writes:
> > Why couldn't an RDBMS such as postgres interpret a SELECT that omits the GROUP
> > BY as implicitly grouping by all the columns that aren't part of an aggregate?

I'm Mr. Curious today ...

Why would you think that such a thing is necessary or desirable? Simply add the
columns to the GROUP BY clause and make the request unambiguous.


Where would the ambiguity be?

I waste an inordinate amount of time retyping select lists over into the group by list, or copying and pasting and then deleting the aggregate clauses.  It is an entirely pointless exercise.  I can't fault PostgreSQL for following the standard, but its too bad the standards aren't more sensible.

Cheers,

Jeff

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: SELECT, GROUP BY, and aggregates
Next
From: Bill Moran
Date:
Subject: Re: SELECT, GROUP BY, and aggregates