SELECT SQL_CALC_FOUND_ROWS h.*, hr.quality_rating, h_api.remote_hotel_id, hm.markup, hm.markup/100 as markup_decimal, hm.strikethrough, hm.strikethrough/100 as strikethrough_decimal FROM hotel_to_api_mapper h_api LEFT JOIN hotel h ON h_api.local_hotel_id = h.id LEFT JOIN hotel_review hr ON h.id = hr.hotel_id LEFT JOIN hotel_markup hm ON h.id = hm.hotel_id WHERE h_api.remote_hotel_id IN (1918, 1921, 3688, 3690, 3892, 3900, 3999, 4000, 4180, 4181, 4654, 4655, 4694, 4695, 4697, 5123, 5124, 5125, 5136, 64909) AND h.is_enabled = 1 AND h_api.local_hotel_id <> '' AND h.id IN (63475, 63477, 63480, 63496, 63499, 63501, 63514, 63519, 63521, 63523, 63600, 63642, 63658, 63661, 63663, 41426, 41427, 41428, 41433, 41434, 41435, 41436, 41437, 41438, 41439, 41440, 41461, 41462, 41463, 41465, 57156, 57157, 57158, 57159, 57160, 57161, 57162, 57163, 57164, 57165, 57166, 57211, 57215, 57218, 57219) GROUP BY h_api.remote_hotel_id Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'blowwow_db.h.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by