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) ORDER BY post_date DESC' at line 1]
SELECT YEAR(post_date) AS `year`, count(ID) as posts FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE post_type = 'post' AND post_status = 'publish' AND wp_posts.ID IN (SELECT DISTINCT ID FROM wp_posts JOIN wp_term_relationships term_relationships ON term_relationships.object_id = wp_posts.ID JOIN wp_term_taxonomy term_taxonomy ON term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id WHERE term_taxonomy.taxonomy = 'category') AND wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN () GROUP BY YEAR(post_date) ORDER BY post_date DESC
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_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE post_type = 'post' AND post_status = 'publish' AND wp_posts.ID IN (SELECT DISTINCT ID FROM wp_posts JOIN wp_term_relationships term_relationships ON term_relationships.object_id = wp_posts.ID JOIN wp_term_taxonomy term_taxonomy ON term_taxonomy.term_taxonomy_id = term_relationships.term_taxonomy_id WHERE term_taxonomy.taxonomy = 'category') AND wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN () GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC