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(1198,957,638,1295,1058,655,860,569,1281,339,1017,953,1165,1243,951,995,503,742,741,952,596,1171,462,667,977,1112,376,935,599,795,449,312,950,954,959,1410,1495,1322,1247,595,645,370,1517,1385,35,45,831,49,979,1514,1395,1093,491,432,395,1330,1375,1260,1350,359,1036,254,332,895,416,859,1241,1251,1386,341,1442,587,779,683,651,553,1363,1498,1222,548,473,572,814,958,960,1035,1394,1447,562,775,621,770,1039,1118,1095,195,509,495,270,478,1282,564,221,233,295,1168,956,931,1258,237,149,102,419,721,16,268,1174,95,133,1232,1066,875,705,480,1119,955,203,542,1242,1071,1088,974,200,458,1135,1024,1114,70,1012,81,583,488,1299,802,1528,1276,1271,1450,636,1467,1483,695,1421,657,1195), 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 (16,35,45,49,70,81,95,102,133,149,195,200,203,221,233,237,254,268,270,295,312,332,339,341,359,370,376,395,416,419,432,449,458,462,473,478,480,488,491,495,503,509,542,548,553,562,564,569,572,583,587,595,596,599,621,636,638,645,651,655,657,667,683,695,705,721,741,742,770,775,779,795,802,814,831,859,860,875,895,931,935,950,951,952,953,954,955,956,957,958,959,960,974,977,979,995,1012,1017,1024,1035,1036,1039,1058,1066,1071,1088,1093,1095,1112,1114,1118,1119,1135,1165,1168,1171,1174,1195,1198,1222,1232,1241,1242,1243,1247,1251,1258,1260,1271,1276,1281,1282,1295,1299,1322,1330,1350,1363,1375,1385,1386,1394,1395,1410,1421,1442,1447,1450,1467,1483,1495,1498,1514,1517,1528) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]