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 ')' at line 1
Error No: 1064
SELECT COUNT(DISTINCT p.product_id) AS total FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id) INNER JOIN product_to_store_alter p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_to_category p2c ON (p.product_id = p2c.product_id) LEFT JOIN product_variation catalogs ON (p.product_id = catalogs.product_id) LEFT JOIN product_variation pvc ON (p.product_id = pvc.product_id) LEFT JOIN variation vc ON (vc.variation_id = pvc.variation_id) LEFT JOIN variation_description vdc ON (vc.variation_id = vdc.variation_id) WHERE pd.language_id = '1' AND p.status = '1' AND p2s.store_id = '0' AND p2s.quantity > '0' AND vc.variation_group_id = '18' AND p2c.category_id = '65' AND catalogs.variation_id IN ()