Currently I have:
SELECT user.userid, Username, count(answerid) as Answers FROM user left outer join answer on user.userid=answer.userid group by user.userid order by Answers desc limit 0,5
This counts the users that have answered the most questions. However I would like to change this to count only the top 5 users who have answered the most questions IN the last 30 days.
The answer table has a field called date1 which contains the date when the answers was posted. Any ideas please? Any help is very much appreciated.