pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Larry Rosenman <ler@lerctr.org>
To: Katka a Daniel Dunajsky <daniel_katka@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Postgresql and Top N Analysis?
Date: Tue, 13 May 2003 16:36:07 -0500
Message-ID: <372780000.1052861767@lerlaptop.iadfw.net> (raw)
In-Reply-To: <Law12-F82jsKcWYSQxg00019507@hotmail.com>
References: <Law12-F82jsKcWYSQxg00019507@hotmail.com>



--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




view thread (2+ messages)

Message-ID: <372780000.1052861767@lerlaptop.iadfw.net>
Permalink:  ../372780000.1052861767@lerlaptop.iadfw.net/
Also on:    postgresql.org/message-id/372780000.1052861767@lerlaptop.iadfw.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ler@lerctr.org, daniel_katka@hotmail.com
  Subject: Re: Postgresql and Top N Analysis?
  In-Reply-To: <372780000.1052861767@lerlaptop.iadfw.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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