Re: SELECT ascending incremental values

2008-02-24 Thread Waynn Lue
- Original Message - From: Waynn Lue [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Friday, February 22, 2008 10:38 AM Subject: SELECT ascending incremental values I'm doing a top 10 list from a database based on a group by and order by, something like select UserId

SELECT ascending incremental values

2008-02-22 Thread Waynn Lue
I'm doing a top 10 list from a database based on a group by and order by, something like select UserId, count(*) as NumActions from Actions group by UserId order by NumActions desc limit 10; Is there any way to put a separate column so I get results like Rank, UserId, NumActions 1, 123, 43 2,

Re: SELECT ascending incremental values

2008-02-22 Thread C.R.Vegelin
, 2008 10:38 AM Subject: SELECT ascending incremental values I'm doing a top 10 list from a database based on a group by and order by, something like select UserId, count(*) as NumActions from Actions group by UserId order by NumActions desc limit 10; Is there any way to put a separate column so I