Re: Top N Records Per Group

From: "Marie G(dot) Tuite" <marie(dot)tuite(at)edisonaffiliates(dot)com>
To: <valerie(at)webtribe(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Top N Records Per Group
Date: 2002-08-02 19:09:04
Message-ID: IGELKLINGDMODABPOOFEOEKACFAA.marie.tuite@edisonaffiliates.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of
> valerie(at)webtribe(dot)net
> Sent: Tuesday, July 30, 2002 2:11 AM
> To: pgsql-general(at)postgresql(dot)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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Wickstrom 2002-08-02 19:11:17 Re: MySQL or Postgres ?
Previous Message Eric Lee Green 2002-08-02 19:00:24 Re: MySQL or Postgres ?