trizz Active member Feb 22, 2017 #1 Hey guys - Need a quick SQL query to find out the top 10 users with most posts between two given dates - Feb 1 2017 and Feb 7 2017. Can anyone help me? Willing to compensate!
Hey guys - Need a quick SQL query to find out the top 10 users with most posts between two given dates - Feb 1 2017 and Feb 7 2017. Can anyone help me? Willing to compensate!
SpecialK Well-known member Feb 22, 2017 #2 Code: select COUNT(*) as count, user_id, username FROM xf_post WHERE post_date BETWEEN 1485907200 AND 1486511940 GROUP BY user_id ORDER BY count DESC LIMIT 10 should do it.
Code: select COUNT(*) as count, user_id, username FROM xf_post WHERE post_date BETWEEN 1485907200 AND 1486511940 GROUP BY user_id ORDER BY count DESC LIMIT 10 should do it.