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(1205,1203,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,151,95,216), 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 (95,151,216,305,307,308,318,334,362,363,371,377,378,431,432,440,451,479,491,507,521,523,537,590,592,610,628,647,666,678,725,731,736,750,759,765,789,794,827,835,845,846,876,889,914,928,973,979,990,999,1005,1007,1043,1053,1079,1082,1089,1093,1101,1108,1121,1134,1155,1156,1164,1173,1181,1203,1205,1239,1267,1287,1303,1314,1324,1336,1351,1380,1395,1439,1464,1511,1514,1537) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]