How to select top 10 reads per month in WordPress

To select top 10 reads per month in WordPress, you need to use the Plugin CountPerDay.
The following mysql snippet will do the rest.

Sample MySQL

SELECT COUNT(page), wp_posts.post_title, wp_posts.post_name from wp_cpd_counter join wp_posts ON wp_posts.id = wp_cpd_counter.page WHERE wp_posts.post_date between '2014-06-01' AND '2014-06-30' GROUP BY page ORDER BY 1 desc LIMIT 10

Please Share us:
Please rate this snippet

2 thoughts on “How to select top 10 reads per month in WordPress

Leave a Reply