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(1197,110,1465,1205,1203,608,1194,1206,1368,1489,1430,354,971,901,832,655,556,1106,387,1240,1381,1017,729,658,559,771,855,394,1275,1366,445,364,742,413,1146,644,943,1541,453,386,1097,327,580,1446,686,1105,1015,741,710,866,687,1090,514,414,526,472,596,1171,1142,871,1189,573,406,717,1009,240,424,132,92,425,481,372,588,637,1010,826,752,433,790,502,582,1521,1013,1091,1263,1229,1269,1387,606,1566,1033,1561,822,726,963,617,1339,1215,1437,1278,719,321,1300,1488,1563,1346,828,670,675,1030,1345,1468,1444,913,1361,1438,920,631,674,1152,897,919,333,1000,379,1008,568,1409,1517,1569,941,909,2,831,836,787,759,1121,1287,1324,1101,592,1134,1164,928,395,1330,1223,504,998,864,698,1412,774,1255,420,863,483,301,351,792,597,439,844,969,346,393,641,992,1070,520,1184,991,818,639,461,1087,345,1401,1067,359,330,534,1241,1447,723,1095,1317,733,586,478,692,1396,221,745,245,1107,337,277,1355,499,1391,1407,1388,1051,1292,1342,796,459,43,851,560,210,242,235,285,964,259,206,166,169,173,167,357,1098,1494,847,1167,525,1252,103,921,910,721,554,375,11,196,226,236,252,247,215,1111,145,142,98,136,135,101,125,91,86,162,120,113,265,114,108,175,95,97,155,118,511,19,194,358,292,706,660,924,883,437,498,705,962,1315,1458,1334,405,925,96,126,1113,714,347,709,550,594,1265,438,749,198,107,157,128,148,1169,1460,868,223,222,1474,640,1344,1109,530,713,304,455,1365,1476,1538,711,1435,367,360,403,974,1060,404,791,506,1534,260,258,881,762,1170,200,423,1068,815,547,213,225,458,256,217,934,1135,811,887,1024,566,684,482,69,84,64,76,1120,1012,74,186,72,578,1328,1029,744,309,1568,1343,1400,679,688,894,1256,1525,1463,862,1084,896,1567,402,805,1257,1299,627,1162,1341,1415,385,1238,904,1450,1483,1403,1448,724,622,857,1195,777,945,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 (2,11,19,43,64,69,72,74,76,84,86,91,92,95,96,97,98,101,103,107,108,110,113,114,118,120,125,126,128,132,135,136,142,145,148,155,157,162,166,167,169,173,175,186,194,196,198,200,206,210,213,215,217,221,222,223,225,226,235,236,240,242,245,247,252,256,258,259,260,265,277,285,292,301,304,309,321,327,330,333,337,345,346,347,351,354,357,358,359,360,364,367,372,375,379,385,386,387,393,394,395,402,403,404,405,406,413,414,420,423,424,425,433,437,438,439,445,453,455,458,459,461,472,478,481,482,483,498,499,502,504,506,511,514,520,525,526,530,534,547,550,554,556,559,560,566,568,573,578,580,582,586,588,592,594,596,597,606,608,617,622,627,631,637,639,640,641,644,655,658,660,670,674,675,679,684,686,687,688,692,698,705,706,709,710,711,713,714,717,719,721,723,724,726,729,733,741,742,744,745,749,752,759,762,771,774,777,787,790,791,792,796,805,811,815,818,822,826,828,831,832,836,844,847,851,855,857,862,863,864,866,868,871,881,883,887,894,896,897,901,904,909,910,913,919,920,921,924,925,928,934,941,943,945,962,963,964,969,971,974,991,992,998,1000,1008,1009,1010,1012,1013,1015,1017,1024,1029,1030,1033,1051,1060,1067,1068,1070,1084,1087,1090,1091,1095,1097,1098,1101,1105,1106,1107,1109,1111,1113,1120,1121,1134,1135,1142,1146,1152,1162,1164,1167,1169,1170,1171,1184,1189,1192,1194,1195,1197,1203,1205,1206,1215,1223,1229,1238,1240,1241,1252,1255,1256,1257,1263,1265,1269,1275,1278,1287,1292,1299,1300,1315,1317,1324,1328,1330,1334,1339,1341,1342,1343,1344,1345,1346,1355,1361,1365,1366,1368,1381,1387,1388,1391,1396,1400,1401,1403,1407,1409,1412,1415,1430,1435,1437,1438,1444,1446,1447,1448,1450,1458,1460,1463,1465,1468,1474,1476,1483,1488,1489,1494,1517,1521,1525,1534,1538,1541,1561,1563,1566,1567,1568,1569) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]