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(197,1206,638,747,1480,778,855,746,524,417,742,489,740,624,374,978,741,389,407,635,573,427,853,425,1074,959,617,1304,1302,828,670,675,1030,311,1345,1468,1321,743,1236,574,674,1358,1237,568,398,590,1351,1181,1395,1537,521,1093,973,1324,1511,666,1464,1108,1101,363,1155,592,1303,999,1053,827,1134,1164,928,789,1330,774,1184,1401,274,284,1442,572,775,1374,505,723,401,248,326,528,652,1396,230,745,1453,296,1388,1471,300,664,1061,459,290,1052,1258,174,102,1475,135,101,1174,175,1066,1182,310,748,1014,1329,134,347,1119,8,749,882,1474,640,530,490,1274,874,1435,974,558,839,487,1116,887,58,64,76,70,1012,74,1094,1080,744,402,1191,809,1276,1271,474,843), 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,58,64,70,74,76,101,102,134,135,174,175,197,230,248,274,284,290,296,300,310,311,326,347,363,374,389,398,401,402,407,417,425,427,459,474,487,489,490,505,521,524,528,530,558,568,572,573,574,590,592,617,624,635,638,640,652,664,666,670,674,675,723,740,741,742,743,744,745,746,747,748,749,774,775,778,789,809,827,828,839,843,853,855,874,882,887,928,959,973,974,978,999,1012,1014,1030,1052,1053,1061,1066,1074,1080,1093,1094,1101,1108,1116,1119,1134,1155,1164,1174,1181,1182,1184,1191,1206,1236,1237,1258,1271,1274,1276,1302,1303,1304,1321,1324,1329,1330,1345,1351,1358,1374,1388,1395,1396,1401,1435,1442,1453,1464,1468,1471,1474,1475,1480,1511,1537) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]