Re: Number the lines - Mailing list pgsql-sql

From Jeff Eckermann
Subject Re: Number the lines
Date
Msg-id 020301c13d4e$1d1d7de0$279c10ac@INTERNAL
Whole thread Raw
In response to Number the lines  (yaubi@yaubi.com (Yoann))
List 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@yaubi.com>
To: <pgsql-sql@postgresql.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@postgresql.org
> 
> 



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: SQL request change when upgrade from 7.0.2 to 7.1.3
Next
From: Patrik Kudo
Date:
Subject: Re: Which SQL query makes it possible to optain the 3 greatest