WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') GROUP BY terms.term_id' at line 15]SELECT COUNT( DISTINCT wp_posts.ID ) as term_count, terms.term_id as term_count_id FROM wp_posts
INNER JOIN wp_term_relationships AS term_relationships ON wp_posts.ID = term_relationships.object_id
INNER JOIN wp_term_taxonomy AS term_taxonomy USING( term_taxonomy_id )
INNER JOIN wp_terms AS terms USING( term_id )
LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
WHERE wp_posts.post_type IN ( 'product' )
AND wp_posts.post_status = 'publish' AND (
wp_posts.ID NOT IN (
SELECT object_id
FROM wp_term_relationships
WHERE term_taxonomy_id IN (7)
)
AND
wp_term_relationships.term_taxonomy_id IN (710)
)AND terms.term_id IN () GROUP BY terms.term_id