In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'thetruth_acnestore.x.id'; this is incompatible with sql_mode=only_full_group_by(No Description) sql: SELECT p.*, o.price + o.amountsaved as originalprice FROM products p, productoffers o WHERE p.id = o.product_id AND p.parent_id = 0 AND p.enabled = 1 AND p.hidden = 0 AND offers > 0 AND o.percentagesaved > 0 AND o.price > 200 AND p.id IN (SELECT product_id FROM products_categories) AND o.id IN (SELECT x.id FROM productoffers x WHERE x.product_id = p.id HAVING MIN(x.price)) ORDER BY o.percentagesaved DESC, p.salesrank DESC LIMIT 3