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,1198,143,161,122,138,106,124,111,1017,1124,848,605,576,130,131,140,99,90,132,121,92,461,1045,581,1454,1083,500,496,1047,756,546,344,273,275,396,246,219,1204,776,164,172,1115,103,921,910,721,554,271,286,114,105,154,151,153,141,97,1113,128,148,199,263,223,227,829,222,404,791,229), 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 (90,92,97,99,103,105,106,110,111,114,121,122,124,128,130,131,132,138,140,141,143,148,151,153,154,161,164,172,199,219,222,223,227,229,246,263,271,273,275,286,344,396,404,461,496,500,546,554,576,581,605,721,756,776,791,829,848,910,921,1017,1045,1047,1083,1113,1115,1124,1197,1198,1204,1454) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]