Hello, I have table for sells, that include: id, user_id, date (linux time) each record in the DB is 1 sell I want to print the user_id of the 10 users who made the top sells (the onces that have the biggest number of row that include the date of this month) how can I do that using PHP and MYSQL?
SELECT user_id, COUNT(user_id) AS user_count FROM my_table WHERE `date` = '2010-08-16' GROUP BY user_id ORDER BY user_count DESC LIMIT 10;