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(1295,494,354,1063,878,971,609,1004,1099,316,466,544,1175,953,1165,729,1480,870,754,1564,771,855,1272,1253,1268,394,951,824,1382,510,720,715,535,436,1011,1275,1366,746,445,980,632,392,984,364,1076,373,1559,1226,1288,732,584,413,1146,1431,453,686,1105,1015,741,710,1177,1148,866,1176,667,1129,946,412,786,1545,923,950,481,588,637,753,325,1085,1263,1410,1304,1404,1339,1370,1554,1246,1478,828,670,675,1030,682,311,1345,1468,323,769,430,1321,743,913,1361,1438,1031,619,773,1371,1409,1557,1517,50,20,1110,1267,979,307,759,914,1121,1336,377,1239,479,537,523,1380,1514,1439,725,318,1043,308,1287,990,1351,1181,1395,1537,521,1093,973,1324,1511,666,1464,1101,363,1155,592,1303,1089,846,371,491,362,750,1007,889,1079,507,1053,1164,928,305,789,905,633,642,757,877,1548,810,854,1429,780,1141,680,1260,618,1003,345,1065,359,898,812,330,1515,575,1386,779,1498,770,723,933,218,799,1107,966,1355,499,620,712,763,1185,1296,1163,1342,917,1471,1362,434,560,1081,1211,1252,1475,1402,19,970,875,869,706,1014,906,552,924,883,437,498,705,1315,1458,1334,630,591,347,709,1169,512,602,788,1377,1520,739,1313,1413,571,903,882,1474,1432,640,336,1550,1398,1280,1344,1242,1291,922,1109,850,380,1071,713,304,570,1417,1509,1250,1274,314,1479,1422,918,1538,360,1166,1068,708,1116,988,533,834,1149,1369,1461,887,1024,566,684,482,1114,186,72,179,81,865,583,654,1139,942,411,809,385,986,350,340,1443,1225,891,1528,1276,1050,388,1271,508,517,474,442,446,695,519,1356,1100,1192), 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 (19,20,50,72,81,179,186,218,304,305,307,308,311,314,316,318,323,325,330,336,340,345,347,350,354,359,360,362,363,364,371,373,377,380,385,388,392,394,411,412,413,430,434,436,437,442,445,446,453,466,474,479,481,482,491,494,498,499,507,508,510,512,517,519,521,523,533,535,537,544,552,560,566,570,571,575,583,584,588,591,592,602,609,618,619,620,630,632,633,637,640,642,654,666,667,670,675,680,682,684,686,695,705,706,708,709,710,712,713,715,720,723,725,729,732,739,741,743,746,750,753,754,757,759,763,769,770,771,773,779,780,786,788,789,799,809,810,812,824,828,834,846,850,854,855,865,866,869,870,875,877,878,882,883,887,889,891,898,903,905,906,913,914,917,918,922,923,924,928,933,942,946,950,951,953,966,970,971,973,979,980,984,986,988,990,1003,1004,1007,1011,1014,1015,1024,1030,1031,1043,1050,1053,1063,1065,1068,1071,1076,1079,1081,1085,1089,1093,1099,1100,1101,1105,1107,1109,1110,1114,1116,1121,1129,1139,1141,1146,1148,1149,1155,1163,1164,1165,1166,1169,1175,1176,1177,1181,1185,1192,1211,1225,1226,1239,1242,1246,1250,1252,1253,1260,1263,1267,1268,1271,1272,1274,1275,1276,1280,1287,1288,1291,1295,1296,1303,1304,1313,1315,1321,1324,1334,1336,1339,1342,1344,1345,1351,1355,1356,1361,1362,1366,1369,1370,1371,1377,1380,1382,1386,1395,1398,1402,1404,1409,1410,1413,1417,1422,1429,1431,1432,1438,1439,1443,1458,1461,1464,1468,1471,1474,1475,1478,1479,1480,1498,1509,1511,1514,1515,1517,1520,1528,1537,1538,1545,1548,1550,1554,1557,1559,1564) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]