1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'wa038747_sfsgbv.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(2656,3103,1972,1910,2100,3051,2752,3026,2406,2739,3007,2132,1986,3106,2660,2704,1949,2580,2286,2868,2938,2139,2199,2946,2536,2248,3185,2588,3025,2431,2526,3123,1953,2777,3098,2949,2285,2235,3101,3049,3090,2596,2803,2668,3066,2932,2278,2634,3119,2010,2155,2568,2433,2107,1921,2618,2073,2341), 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 po.products_options_id>2 and p2a.products_id IN (1910,1921,1949,1953,1972,1986,2010,2073,2100,2107,2132,2139,2155,2199,2235,2248,2278,2285,2286,2341,2406,2431,2433,2526,2536,2568,2580,2588,2596,2618,2634,2656,2660,2668,2704,2739,2752,2777,2803,2868,2932,2938,2946,2949,3007,3025,3026,3049,3051,3066,3090,3098,3101,3103,3106,3119,3123,3185) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]