WordPress database error: [Incorrect DATETIME value: '0000-00-00 00:00:00']
SELECT DISTINCT YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts FROM pt_posts WHERE post_date < '2024-11-25 22:00:15' AND post_date != '0000-00-00 00:00:00' AND post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC