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(160,832,1017,949,406,668,123,1410,1304,1404,1445,1536,1414,1309,1266,1427,10,1433,165,549,162,141,1032,188,68,1120,1012,1029,744), 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 (10,68,123,141,160,162,165,188,406,549,668,744,832,949,1012,1017,1029,1032,1120,1266,1304,1309,1404,1410,1414,1427,1433,1445,1536) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]