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

Поиск
Список
Период
Сортировка
От yaubi@yaubi.com (Yoann)
Тема Which SQL query makes it possible to optain the 3 greatest values of an interger list ?
Дата
Msg-id 70c8063b.0109120041.5fc5d0d1@posting.google.com
обсуждение исходный текст
Ответы Re: Which SQL query makes it possible to optain the 3 greatest  (Patrik Kudo <kudo@partitur.se>)
Re: Which SQL query makes it possible to optain the 3 greatest values of an interger list ?  ("Wei Weng" <wweng@kencast.com>)
Список 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 по дате отправления:

Предыдущее
От: domingo@dad-it.com (Domingo Alvarez Duarte)
Дата:
Сообщение: using LATIN1 ?
Следующее
От: "datactrl"
Дата:
Сообщение: array variable in pl/pgsql