Currency:
1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'mm039005_abarbbb.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(296,404,429,505,525,539,540,589,672,716,809,845,866,1280,1290,1339,1340,1363,1413,1547,1590,1624,1667,1670,1673,2134,2234,2381,2411,2413,2412,2484,2499,2509,2747,2768,2918,2952,2980,2995,3018,3036,3039,3070,3207,3480,3492,3721,3726,3740,3940), 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 (2918,2952,2980,2995,3018,3207,3721,716,1667,404,429,505,589,1280,1290,1339,1340,1363,1413,1624,1673,3036,3039,3492,3726,1590,1547,296,525,539,540,3070,672,809,845,866,1670,2234,2381,2411,2412,2413,2484,2509,2747,2768,2134,2499,3480,3740,3940) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]