Counting Average Number of Posts

July 11, 2008 at 11:45 am | In Thoughts | Comments Off
Tags: , , ,

Recently I was asked by MPOW to determine the number of new posts that we added to our blog in a day. To count the average number of posts we add in a day I used the following SQL script.


SELECT COUNT(p.id) as post_count
FROM wp_posts p
AND p.post_date IS NOT NULL
AND DAYOFYEAR(p.post_date) IS NOT NULL
GROUP BY DAYOFYEAR(p.post_date)

Blog at WordPress.com. | Theme: Pool by Borja Fernandez.
Entries and comments feeds.