Re: Postgresql and Top N Analysis? - Mailing list pgsql-sql

From Larry Rosenman
Subject Re: Postgresql and Top N Analysis?
Date
Msg-id 372780000.1052861767@lerlaptop.iadfw.net
Whole thread Raw
In response to Postgresql and Top N Analysis?  ("Katka a Daniel Dunajsky" <daniel_katka@hotmail.com>)
List pgsql-sql

--On Tuesday, May 13, 2003 15:32:57 -0600 Katka a Daniel Dunajsky 
<daniel_katka@hotmail.com> wrote:

> Hello all,
>
> Can anyone give me an hit how to do Top 'N' Analysis in postgresql (if it
> is possible)? I see that postgresql does not have an pseudocolumn rownum,
> therefore I can't use query like this:
>
> SELECT   *
> FROM     (SELECT DISTINCT session_type_id FROM user_sessions ORDER BY
> session_type_id) as dummy GROUP BY dummy;
>
> Thank you for your time.

look at the LIMIT parameter of SELECT, If I'm reading you right.





-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 972-414-9812                 E-Mail: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749



pgsql-sql by date:

Previous
From: "Katka a Daniel Dunajsky"
Date:
Subject: Postgresql and Top N Analysis?
Next
From: Tom Lane
Date:
Subject: Re: Ok, how do I debug THIS?