Re: Top N Records Per Group
Marie G. Tuite <marie.tuite@edisonaffiliates.com>
From: "Marie G. Tuite" <marie.tuite@edisonaffiliates.com>
To: <valerie@webtribe.net>, <pgsql-general@postgresql.org>
Date: 2002-08-02T19:09:04Z
Lists: pgsql-general
There is a limit which is similar to SQL2K and there is also an offset option. select blah from blah limit 5; > -----Original Message----- > From: pgsql-general-owner@postgresql.org > [mailto:pgsql-general-owner@postgresql.org]On Behalf Of > valerie@webtribe.net > Sent: Tuesday, July 30, 2002 2:11 AM > To: pgsql-general@postgresql.org > Subject: [GENERAL] Top N Records Per Group > > > Is there a "top" function in postgres? I've had a look and > don't see one. > > As an example: How would I extract the top 5 salesmen PER > region using Postgres? > > TIA > > ---------------------------(end of broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly >