WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC' at line 1] SELECT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM wp_new_posts JOIN wp_new_term_relationships term_relationships ON term_relationships.object_id = wp_new_posts.ID JOIN wp_new_term_taxonomy term_taxonomy ON term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id WHERE post_type = 'post' AND post_status = 'publish' AND term_taxonomy.taxonomy = 'category' AND term_taxonomy.term_id in () GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC