In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'vital828_shop.x.id'; this is incompatible with sql_mode=only_full_group_by(No Description) sql: SELECT p.id, o.price FROM products p, productoffers o WHERE p.id = o.product_id AND parent_id = 0 AND hidden = 0 AND offers > 0 AND (SELECT COUNT(pi.id) FROM productimages pi WHERE pi.product_id = p.id) > 1 AND o.id IN (SELECT x.id FROM productoffers x WHERE x.product_id = p.id HAVING MIN(x.price)) ORDER BY p.title DESC LIMIT 24