From: | "Jeff Eckermann" <jeckermann(at)verio(dot)net> |
---|---|
To: | "Yoann" <yaubi(at)yaubi(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Number the lines |
Date: | 2001-09-14 18:50:15 |
Message-ID: | 020301c13d4e$1d1d7de0$279c10ac@INTERNAL |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
If you want "the third maximum value", easist to do:
SELECT * FROM table ORDER BY whatever DESC OFFSET 2 LIMIT 1;
----- Original Message -----
From: "Yoann" <yaubi(at)yaubi(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Sent: Friday, September 14, 2001 7:05 AM
Subject: Number the lines
> how can I number the result's lines of a sql query ?
>
> explaination : I have a query which return me a list of values. I need
> to order them (it's ok, easy ;) and then number the lines. The goal is
> then to extract, for example, "the third maximum value".
>
> Tx in advance !
> Yoann
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Julester | 2001-09-14 18:58:29 | Checking for table existence |
Previous Message | Richard NAGY | 2001-09-14 17:31:26 | Re: SQL request change when upgrade from 7.0.2 to 7.1.3 |