sub-limiting a query - Mailing list pgsql-sql

From Louis-David Mitterrand
Subject sub-limiting a query
Date
Msg-id 20070217125634.GA20589@apartia.fr
Whole thread Raw
Responses Re: sub-limiting a query  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: sub-limiting a query  ("M.P.Dankoor" <m.p.dankoor@gmail.com>)
Re: sub-limiting a query  (Andreas Kretschmer <akretschmer@spamfence.net>)
Re: sub-limiting a query  ("M.P.Dankoor" <m.p.dankoor@gmail.com>)
List pgsql-sql
Hello,

I've got a table of shows with different types (movie, theater, 
ballet,etc.) and I am looking for a select that can return the 10 last 
entered shows AND at most 2 of each type. Is that possible in one query?

The table looks basically like:
created_on      | timestamp without time zone show_name       | text id_show         | integer
show_type      | text                        id_show_subtype | integer                     
 


pgsql-sql by date:

Previous
From: "Rajesh Kumar Mallah"
Date:
Subject: ordering of selected rows from an ordered subselect
Next
From: "A. Kretschmer"
Date:
Subject: Re: sub-limiting a query