SELECT YEAR ( `p` . `post_date_gmt` ) AS `year` , SQL_TSI_MONTH ( `p` . `post_date_gmt` ) AS `month` , COUNT ( `p` . `ID` ) AS `numposts` , MAX ( `p` . `post_modified_gmt` ) AS `last_mod` FROM `wp_posts` `p` WHERE `p` . `post_password` = ? AND `p` . `post_type` = ? AND `p` . `post_status` = ? GROUP BY YEAR ( `p` . `post_date_gmt` ) , SQL_TSI_MONTH ( `p` . `post_date_gmt` ) ORDER BY `p` . `post_date_gmt` DESC 