Re: getting the ranks of items

Поиск
Список
Период
Сортировка
От merlyn@stonehenge.com (Randal L. Schwartz)
Тема Re: getting the ranks of items
Дата
Msg-id 86mzrbu7sw.fsf@blue.stonehenge.com
обсуждение исходный текст
Ответ на Re: getting the ranks of items  (Matthew Terenzio <matt@jobsforge.com>)
Ответы Re: getting the ranks of items  ("Joshua D. Drake" <jd@commandprompt.com>)
Список pgsql-general
>>>>> "Matthew" == Matthew Terenzio <matt@jobsforge.com> writes:

Matthew> On May 3, 2005, at 8:30 PM, Randal L. Schwartz wrote:

>> Is there a simple way with PostgreSQL to assign relative ranks to the
>> result of a query ORDER BY?


Matthew> What do you mean by ranks?

If I order a query by ascending age, the youngest person gets
rank 1, the second youngest gets rank 2, the third youngest gets rank 3,
and if the fourth and fifth tie, they both get 4, and the next one gets 6.

You know, rank? :)

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

В списке pgsql-general по дате отправления:

Предыдущее
От: Matthew Terenzio
Дата:
Сообщение: Re: getting the ranks of items
Следующее
От: Lyubomir Petrov
Дата:
Сообщение: Re: getting the ranks of items