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(1200,1194,143,161,1456,494,734,669,722,665,1281,551,1165,729,392,373,503,949,732,584,937,413,1146,366,735,1286,1213,758,1307,1073,699,1009,1183,469,291,251,1545,637,753,1263,1495,1379,1418,1293,1246,1215,1563,1346,1477,828,670,675,1030,629,837,1345,1468,323,769,1319,1031,1000,773,6,17,1267,979,307,759,794,914,1121,1336,377,1239,876,1173,590,479,845,537,731,440,835,334,523,765,1380,1514,1439,725,318,1043,308,628,1287,990,1351,1181,1395,1537,521,1093,973,1324,1511,666,1464,1108,1101,363,1155,592,1303,999,1156,1089,846,1314,1005,371,491,362,750,1007,889,1079,678,378,507,736,1053,827,1134,1164,928,305,610,647,451,789,431,1082,432,858,911,633,642,810,842,1038,701,359,898,341,273,275,676,1028,927,652,1282,899,279,966,277,1061,772,1204,116,156,1316,1006,663,1402,3,1364,1261,660,137,1144,607,493,361,1126,885,830,1460,263,223,997,423,55,411), 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 (3,6,17,55,116,137,143,156,161,223,251,263,273,275,277,279,291,305,307,308,318,323,334,341,359,361,362,363,366,371,373,377,378,392,411,413,423,431,432,440,451,469,479,491,493,494,503,507,521,523,537,551,584,590,592,607,610,628,629,633,637,642,647,652,660,663,665,666,669,670,675,676,678,699,701,722,725,729,731,732,734,735,736,750,753,758,759,765,769,772,773,789,794,810,827,828,830,835,837,842,845,846,858,876,885,889,898,899,911,914,927,928,937,949,966,973,979,990,997,999,1000,1005,1006,1007,1009,1028,1030,1031,1038,1043,1053,1061,1073,1079,1082,1089,1093,1101,1108,1121,1126,1134,1144,1146,1155,1156,1164,1165,1173,1181,1183,1194,1200,1204,1213,1215,1239,1246,1261,1263,1267,1281,1282,1286,1287,1293,1303,1307,1314,1316,1319,1324,1336,1345,1346,1351,1364,1379,1380,1395,1402,1418,1439,1456,1460,1464,1468,1477,1495,1511,1514,1537,1545,1563) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]