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 terms.term_id' at line 15]SELECT COUNT( DISTINCT wp9y_posts.ID ) as term_count, terms.term_id as term_count_id FROM wp9y_posts
INNER JOIN wp9y_term_relationships AS term_relationships ON wp9y_posts.ID = term_relationships.object_id
INNER JOIN wp9y_term_taxonomy AS term_taxonomy USING( term_taxonomy_id )
INNER JOIN wp9y_terms AS terms USING( term_id )
LEFT JOIN wp9y_term_relationships ON (wp9y_posts.ID = wp9y_term_relationships.object_id)
WHERE wp9y_posts.post_type IN ( 'product' )
AND wp9y_posts.post_status = 'publish' AND (
wp9y_posts.ID NOT IN (
SELECT object_id
FROM wp9y_term_relationships
WHERE term_taxonomy_id IN (7)
)
AND
wp9y_term_relationships.term_taxonomy_id IN (69)
)AND terms.term_id IN () GROUP BY terms.term_id