Statement could not be executed (42000 - 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column '' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by) FULL SQL -> SELECT `eicra_hotels_page_view`.*, Count(*) AS `num_products` FROM `eicra_hotels_page_view` WHERE ( eicra_hotels_page_view.lang_flag = '' OR eicra_hotels_page_view.lang_flag = 'any' ) AND = "1" GROUP BY country_id ORDER BY `num_products` DESC LIMIT :limit