Try something like this:

select Screen_Name,count(*)
from MBoard
where Message_Date>='2003-11-00'
group by Screen_Name
order by 2 desc
limit 5;

Peter Sap

----- Original Message -----
From: "Daniel Harik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, November 16, 2003 12:28 PM
Subject: Creating statistics


> Hello,
>
> I have table with messages, and i have users table, the are  linked via PK
> UserID -> UserID, what i need is to select Messages for current month and
> calculate top 5 posters list for current month.
>
> I have create following query but it's not complete:
>
> SELECT Handle, Screen_Name from MBoard where Message_Date>='2003-11-00'
ORDER BY Handle;
>
> this gets me all messages posted this month ordered by userid
>
>
> Thank You.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to