pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeff Eckermann <jeckermann@verio.net>
To: Yoann <yaubi@yaubi.com>
To: pgsql-sql@postgresql.org
Subject: Re: Number the lines
Date: Fri, 14 Sep 2001 13:50:15 -0500
Message-ID: <020301c13d4e$1d1d7de0$279c10ac@INTERNAL> (raw)
References: <70c8063b.0109140405.1895bf0d@posting.google.com>

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




view thread (6+ messages)  latest in thread

Message-ID: <020301c13d4e$1d1d7de0$279c10ac@INTERNAL>
Permalink:  ../020301c13d4e$1d1d7de0$279c10ac@INTERNAL/
Also on:    postgresql.org/message-id/020301c13d4e$1d1d7de0$279c10ac@INTERNAL

 · 

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: jeckermann@verio.net, yaubi@yaubi.com
  Subject: Re: Number the lines
  In-Reply-To: <020301c13d4e$1d1d7de0$279c10ac@INTERNAL>

* 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