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(608,957,143,161,1069,771,130,131,140,1539,35,2,32,50,42,6,17,39,25,4,49,237,206,404,791,1032,69,73,52,66), 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 (2,4,6,17,25,32,35,39,42,49,50,52,66,69,73,130,131,140,143,161,206,237,404,608,771,791,957,1032,1069,1539) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]