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(1130,625,538,728,1125,1436,754,658,771,1272,1078,463,632,417,441,1286,1213,819,1189,939,617,631,1500,909,836,666,496,756,40,8,1265,438,749,739,1413,1474,1432,685), 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 (8,40,417,438,441,463,496,538,617,625,631,632,658,666,685,728,739,749,754,756,771,819,836,909,939,1078,1125,1130,1189,1213,1265,1272,1286,1413,1432,1436,1474,1500) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]