Determining Rank
От
Don Drake
Тема
Determining Rank
Дата
Msg-id
6c21003b05020319061f8bce45@mail.gmail.com
Список
Дерево обсуждения
Determining Rank Don Drake <dondrake@gmail.com>
Re: Determining Rank Michael Fuhr <mike@fuhr.org>
Re: Determining Rank Michael Glaesemann <grzm@myrealbox.com>
Re: Determining Rank Don Drake <dondrake@gmail.com>
Re: Determining Rank PFC <lists@boutiquenumerique.com>
I have a query that shows the top N count(*)'s. So it's basically: select some_val, count(*) from big_table group by some_val order by count(*) limit 50 Now, I would like to have the rank included in the result set. The first row would be 1, followed by 2, etc. all the way to 50. I can do this in PHP, but stuffing it into the DB query makes other things easier. Any ideas? Thanks. -Don -- Donald Drake President Drake Consulting http://www.drakeconsult.com/ http://www.MailLaunder.com/ 312-560-1574
В списке pgsql-sql по дате отправления