Re: select id,count(imdb_id) problem

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: select id,count(imdb_id) problem
Дата
Msg-id 20060410053800.GA9105@webserv.wug-glas.de
обсуждение исходный текст
Ответ на select id,count(imdb_id) problem  (Ntina Papadopoulou <ntina23gr@freemail.gr>)
Ответы Re: select id,count(imdb_id) problem  (Ntina Papadopoulou <ntina23gr@freemail.gr>)
Список pgsql-novice
am  10.04.2006, um  8:28:12 +0300 mailte Ntina Papadopoulou folgendes:
> Hello community!
>
> When I type a query in postgresql, like
>
> select id,imdb_id,count(imdb_id) from "Movies" where id<10 group by
> imdb_id;
>
> it says: column "Movies.id" must appear in the GROUP BY clause or be used
> in an aggregate function
> Where is the error?

The column 'Movies.id' isn't in the group by clause.


> What is the right spelling of this query?

select id,imdb_id,count(imdb_id) from "Movies" where id<10 group by
id,imdb_id;


HTH, Andreas
--
Andreas Kretschmer    (Kontakt: siehe Header)
Heynitz:  035242/47215,      D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
 ===    Schollglas Unternehmensgruppe    ===

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

Предыдущее
От: Ntina Papadopoulou
Дата:
Сообщение: select id,count(imdb_id) problem
Следующее
От: Ntina Papadopoulou
Дата:
Сообщение: Re: select id,count(imdb_id) problem