Hi

 

I wonder if someone could help with what I assume is a simple query
using GROUP and/or ORDER statements (something I struggle to get to
grips with).  I am trying to get a list of users who have posted to a
forum by number of posts descending, but am unable to find the right
statement to do it.

 

At the moment I have: "select count(*), user_id FROM messages WHERE
forum_id = 294 GROUP BY user_id" . which gets me what I want, but in a
random user order.

 

I have looked through the MySQL documentation, but have been unable to
hit on the combination of functions needed to get what I need (which is
effectively 'ORDER BY count(*) DESC').

Can anybody help?

 

Many thanks

Gary

Reply via email to