Disk full (/var/tmp/#sql_d07_0); waiting for someone to free some space...
SELECT COUNT(DISTINCT p.productID) as cnt FROM (SELECT p.*, GROUP_CONCAT(CONCAT( p.productID,sp.variantID)) as model FROM SC_products p LEFT JOIN SC_product_options_set sp ON (sp.productID = p.productID AND sp.optionID = 52) group BY p.productID) p WHERE ( (p.productID IN (771,1259,2615,2613,2732)) OR (categoryID IN (576)) ) AND ( enabled=1)