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(1227,609,448,656,1265,1357,438,749,1522,397,249,198,107,157,128,148,255,961,203,830,1169,512,602,1034,788,280,542,1377,1520,1262,1460,454,320,868,1457,739,199,263,223,227,829,222,1313,1413,571,903,882,1474,1432,640,336,1550,1398,1280,1344,1242,1291,922,1109,1157,850,380,408,1071,611), 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 (107,128,148,157,198,199,203,222,223,227,249,255,263,280,320,336,380,397,408,438,448,454,512,542,571,602,609,611,640,656,739,749,788,829,830,850,868,882,903,922,961,1034,1071,1109,1157,1169,1227,1242,1262,1265,1280,1291,1313,1344,1357,1377,1398,1413,1432,1457,1460,1474,1520,1522,1550) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]