Disk full (/var/tmp/#sql_70a_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 (categoryID IN (628)) AND ( enabled=1)