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(737,541,382,143,138,335,669,1381,754,394,951,510,720,1275,1366,746,445,489,1541,1233,689,1485,513,1127,697,291,251,582,1521,996,1414,1503,1300,1302,1477,828,670,675,1030,1345,1468,1470,379,1449,1318,941,39,1267,979,307,759,1314,1005,736,1053,858,1223,1429,641,780,543,816,1153,557,806,1386,341,814,1394,775,365,536,1459,1317,983,586,342,219,1096,745,245,1352,1362,1138,623,242,212,171,165,170,163,168,169,173,549,116,156,1402,41,46,103,7,40,16,31,36,26,226,241,86,108,154,1064,798,1158,970,480,34,861,529,955,8,594,282,157,148,830,320,1088,1509,1264,874,1283,1022,1166,202,423,458,811,887,1024,684,482,79,84,70,80,688,894,1256,1440,1451,1463,1341,1415,1443,1271,1403,1448,1526,1441,1054,672,777,945), 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 (7,8,16,26,31,34,36,39,40,41,46,70,79,80,84,86,103,108,116,138,143,148,154,156,157,163,165,168,169,170,171,173,202,212,219,226,241,242,245,251,282,291,307,320,335,341,342,365,379,382,394,423,445,458,480,482,489,510,513,529,536,541,543,549,557,582,586,594,623,641,669,670,672,675,684,688,689,697,720,736,737,745,746,754,759,775,777,780,798,806,811,814,816,828,830,858,861,874,887,894,941,945,951,955,970,979,983,996,1005,1022,1024,1030,1053,1054,1064,1088,1096,1127,1138,1153,1158,1166,1223,1233,1256,1264,1267,1271,1275,1283,1300,1302,1314,1317,1318,1341,1345,1352,1362,1366,1381,1386,1394,1402,1403,1414,1415,1429,1440,1441,1443,1448,1449,1451,1459,1463,1468,1470,1477,1485,1503,1509,1521,1526,1541) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]