currency:
1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'ch040572_40572chw.pov.products_options_values_sort_order' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
in:
[SELECT count(DISTINCT p2a.products_id) as quantity, po.products_options_name, pov.products_options_values_name, SUM(IF(p2a.products_id IN(1077,1390,322,1487,1397,1518,1372,1322,719,321,646,825,944,994,1190,782,1036,1143,893,254,1042,522,332,1057,443,567,895,803,284,288,562,775,621,211,270,464,1252,1475,1402,271,286,1290), 1, 0)) as flag FROM products_attributes p2a JOIN products_options po ON p2a.options_id = po.products_options_id JOIN products_options_values pov ON p2a.options_values_id = pov.products_options_values_id WHERE p2a.products_id IN (211,254,270,271,284,286,288,321,322,332,443,464,522,562,567,621,646,719,775,782,803,825,893,895,944,994,1036,1042,1057,1077,1143,1190,1252,1290,1322,1372,1390,1397,1402,1475,1487,1518) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]