1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'wa038747_sfsgbv.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(208,321,327,338,355,356,414,428,429,432,433,434,435,436,437,438,441,463,472,474,475,476,477,480,481,483,487,495,496,617,1015,1121,1214,1267,1269,1273,1274,1272,1275,1277,1279,1280,1387,1399,1479,1478,1564,1578,1586,1588,1694,1791,1792), 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 po.products_options_id>2 and p2a.products_id IN (208,321,327,338,355,356,414,428,429,432,433,434,435,436,437,438,441,463,472,474,475,476,477,480,481,483,487,495,496,617,1015,1121,1214,1267,1269,1272,1273,1274,1275,1277,1279,1280,1387,1399,1478,1479,1564,1578,1586,1588,1694,1791,1792) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]