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 'AND pos.optionID = 2 GROUP BY povv.variantID' at line 7
SELECT povv.variantID, povv.slug, povv.option_value_ru, prod.productID, prod.name_ru FROM SC_products_opt_val_variants povv JOIN SC_product_options_set pos ON pos.variantID = povv.variantID JOIN SC_products prod ON pos.productID = prod.productID WHERE povv.optionID = 2 AND povv.variantID IN (4,7,6,15,17,11,14,5,16,20,19) AND prod.categoryID = AND pos.optionID = 2 GROUP BY povv.variantID