Re: SQL question re aggregates & joins

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SQL question re aggregates & joins
Дата
Msg-id 15678.1264718182@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: SQL question re aggregates & joins  (Scott Ribe <scott_ribe@killerbytes.com>)
Список pgsql-general
Scott Ribe <scott_ribe@killerbytes.com> writes:
> Given that t2.id is the primary key, grouping by any other column of t2 is
> really redundant. I know *what* SQL won't allow me to do, I'm interested in
> knowing if there's some reason *why* other than historical...

SQL92 says so.  More recent versions of the SQL spec describe allowing
omission of grouping columns when one of them can be proven unique,
but it's complicated and we haven't got round to doing it.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: "Dann Corbit"
Дата:
Сообщение: Re: SQL question re aggregates & joins
Следующее
От: Mike Bresnahan
Дата:
Сообщение: Re: Amazon EC2 CPU Utilization