Re: select id,count(imdb_id) problem

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Ntina Papadopoulou <ntina23gr(at)freemail(dot)gr>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: select id,count(imdb_id) problem
Date: 2006-04-10 06:07:38
Message-ID: 20060410060738.GA28322@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, Apr 10, 2006 at 08:52:11 +0300,
Ntina Papadopoulou <ntina23gr(at)freemail(dot)gr> wrote:
> >>select id,imdb_id,count(imdb_id) from "Movies" where id<10 group by
> >>imdb_id;
>
> The desired result is
> something like
> id | imdb_id | count
> ----+---------+-------
> 1 | 315733 | 9
> 10 | 335753 | 1
> 11 | 320000 | 15
> etc.

select imdb_id,count(imdb_id) from "Movies" where id<10 group by imdb_id;
might be closer to what you want.
However, the example that you gave doesn't match that exactly.
Maybe if you described what you are trying to do in more detail, people could
give you some better suggestions.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Ntina Papadopoulou 2006-04-10 06:25:58 Re: select id,count(imdb_id) problem
Previous Message Ntina Papadopoulou 2006-04-10 06:06:50 Re: select id,count(imdb_id) problem