Re: SELECT, GROUP BY, and aggregates

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: SELECT, GROUP BY, and aggregates
Дата
Msg-id CAMkU=1yonuNjGhVkMCMfEQfcQF3Guo3YfmeFodaUcKdEN2y5qQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SELECT, GROUP BY, and aggregates  (Bill Moran <wmoran@potentialtech.com>)
Ответы Re: SELECT, GROUP BY, and aggregates  (Bill Moran <wmoran@potentialtech.com>)
Re: SELECT, GROUP BY, and aggregates  (Peter Eisentraut <peter_e@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: SELECT, GROUP BY, and aggregates
Следующее
От: Bill Moran
Дата:
Сообщение: Re: SELECT, GROUP BY, and aggregates