Skip site navigation (1) Skip section navigation (2)

select id,count(imdb_id) problem

From: Ntina Papadopoulou <ntina23gr(at)freemail(dot)gr>
To: pgsql-novice(at)postgresql(dot)org
Subject: select id,count(imdb_id) problem
Date: 2006-04-10 05:28:12
Message-ID: 4439ECEC.1060601@freemail.gr (view raw or flat)
Thread:
Lists: pgsql-novice
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?
What is the right spelling of this query?

____________________________________________________________________
http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου.
http://www.freemail.gr - free email service for the Greek-speaking.

Responses

pgsql-novice by date

Next:From: A. KretschmerDate: 2006-04-10 05:38:00
Subject: Re: select id,count(imdb_id) problem
Previous:From: William WallaceDate: 2006-04-10 04:46:44
Subject: count(imdb_id) problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group