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 ')' at line 7SELECT
COUNT(DISTINCT p.id)
FROM
gujian_post_categories AS pc
LEFT JOIN gujian_posts AS p ON pc.post_id = p.id
WHERE
deleted = 0 AND publish_time < 1711709458 AND status = 1 AND type = 3 AND pc.cat_id IN ()