pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgresql and Top N Analysis?
2+ messages / 2 participants
[nested] [flat]
* Postgresql and Top N Analysis?
@ 2003-05-13 21:32 Katka a Daniel Dunajsky <daniel_katka@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Katka a Daniel Dunajsky @ 2003-05-13 21:32 UTC (permalink / raw)
To: pgsql-sql
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.
Daniel
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Postgresql and Top N Analysis?
@ 2003-05-13 21:36 Larry Rosenman <ler@lerctr.org>
parent: Katka a Daniel Dunajsky <daniel_katka@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Larry Rosenman @ 2003-05-13 21:36 UTC (permalink / raw)
To: Katka a Daniel Dunajsky <daniel_katka@hotmail.com>; 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-05-13 21:36 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-13 21:32 Postgresql and Top N Analysis? Katka a Daniel Dunajsky <daniel_katka@hotmail.com>
2003-05-13 21:36 ` Larry Rosenman <ler@lerctr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox