WordPress Comment Stats Query

KarmaDude Jan 14, 2009

Here is a query you can run against your WordPress comments table to view total comments by year and month. If you use a different table name prefix, then substitute ‘wp’ with your table name prefix.

SELECT year(comment_date) as y, month(comment_date) as m, concat(substr(monthname(comment_date),1,3), " ", year(comment_date)) as month, count(*) as total
FROM wp_comments
GROUP BY y, m
ORDER BY m, y ASC