Re: help with pagila

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: help with pagila
Дата
Msg-id 20060901152116.GE17178@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на help with pagila  ("Walter Cruz" <walter.php@gmail.com>)
Ответы Re: help with pagila
Список pgsql-sql
On Fri, Sep 01, 2006 at 10:31:48AM -0300, Walter Cruz wrote:
> "ERROR:  column "film.description" must appear in the GROUP BY clause or be
> used in an aggregate function"
> 
> If I put that column on GROUP BY everything works ok. But I want understant
> why do I need to do that. Can someone teach me, please?

You need to because everything else is being grouped or aggregated.
Otherwise, you should get one row for every match of
film.description, and that's not what you want.  (More precisely and
yet still completely imprecise, that's not even something you can
have, because of the way sets work.)

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.                --Brad Holland


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

Предыдущее
От: "Walter Cruz"
Дата:
Сообщение: help with pagila
Следующее
От: "Walter Cruz"
Дата:
Сообщение: Re: help with pagila