Server shutdown in progress SQL query : SELECT COUNT(DISTINCT p.productID) FROM SS_products p where categoryID>1 AND enabled=1 AND p.productID IN (SELECT productID FROM SS_product_options_values WHERE `optionID`=35 AND `option_value`<>'')