Which SQL query makes it possible to optain the 3 greatest values of an interger list ? - Mailing list pgsql-sql

From yaubi@yaubi.com (Yoann)
Subject Which SQL query makes it possible to optain the 3 greatest values of an interger list ?
Date
Msg-id 70c8063b.0109120041.5fc5d0d1@posting.google.com
Whole thread Raw
Responses Re: Which SQL query makes it possible to optain the 3 greatest
Re: Which SQL query makes it possible to optain the 3 greatest values of an interger list ?
List pgsql-sql
OO( Sql Problem )Oo. 

That is to say a table of 5 inputs of 1 integer field : 
  Table = { (1); (12); (3); (9); (4) }

We want to obtain a result of 1 input of 3 fields, 
corresponding to the 3 greatest values of Table, 
by descending order : 
  Result = { (12; 9; 4) } 

=> Which SQL query makes it possible to obtain Result from Table ?
We certainly need to use sub-queries, but how ?

Thank you in advance for your help !

Yoann AUBINEAU


pgsql-sql by date:

Previous
From: domingo@dad-it.com (Domingo Alvarez Duarte)
Date:
Subject: using LATIN1 ?
Next
From: "datactrl"
Date:
Subject: array variable in pl/pgsql