Currency:
1055 Expression #2 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'al039008_dfrbabr.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(606,30,47,55,93,1515,1202,305,326,587,473,237,854,400,3685,2092,1591,1804,4898,1554,3995,4386,3845,1160,1314,3768,1463,1405,2515,2513,4628,3843,4025,1185,1945,330,3585,2718,4545,2884,280,3945,1567,1608,1467,2560,1597,4110,1439,4188,1376,3895,4132,4273,3274,2062,1687,4444,3801,3354,3371,2028,1094,1100,873,1114,1059,1885,3388,970,3636,5038,4928,5047,5050,5051,4672,2549,4832,2754,2563,4630,164,4,112,119,2372,2379,2393,117,154,141,2189,2208,2335,2316,4307,2070,2000,3735,395,281,4117,4042,158,1833,1835,1312,3154,1145,4417,1770,542,1101,3596,2357,2349,4501,3421,2798,2525,2841,4873,2131,3399,2325,2313,2239,109,131,137,102,4552,4562,2680,5010,2689,4679,2816,4639,4575,2701,2975,4566,2746,4876,4938,4958,3465,3306,3285,3503,3428,3373,3368,3478,5034,3538,1445,2363,1133,4741,4745,4756,596,3641,1054,573,3558,2460,2409,3064,3070,4300,4286,3712,1728,62,2340,2342,2355,2348,2352,116,51,142,1268,4116,2713,1643,2760,2602,2912,2418,2481,3081,3146,1993,2443,4917,4799,607,524,695,3568,492,3656,3356,4899,2023,4109,4240,4093,1996,4047,4478,3526,1609,4413,4431,2426,2429,3133,3258,4335,3896,2213,2378,2382,2212,2175,2182,2387,46,29,2374,2390,2391,4737,4740,4617,4534,303,651,2250,946,448,3228,206,689,272,2143,4771,3182,3171,4787,402,2698,3348,3449,3151,3256,2955,2930,2574), 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 (4,29,30,46,47,51,55,62,93,102,109,112,116,117,119,131,137,141,142,154,158,164,206,237,272,280,281,303,305,326,330,395,400,402,448,473,492,524,542,573,587,596,606,607,651,689,695,854,873,946,970,1054,1059,1094,1100,1101,1114,1133,1145,1160,1185,1202,1268,1312,1314,1376,1405,1439,1445,1463,1467,1515,1554,1567,1591,1597,1608,1609,1643,1687,1728,1770,1804,1833,1835,1885,1945,1993,1996,2000,2023,2028,2062,2070,2092,2131,2143,2175,2182,2189,2208,2212,2213,2239,2250,2313,2316,2325,2335,2340,2342,2348,2349,2352,2355,2357,2363,2372,2374,2378,2379,2382,2387,2390,2391,2393,2409,2418,2426,2429,2443,2460,2481,2513,2515,2525,2549,2560,2563,2574,2602,2680,2689,2698,2701,2713,2718,2746,2754,2760,2798,2816,2841,2884,2912,2930,2955,2975,3064,3070,3081,3133,3146,3151,3154,3171,3182,3228,3256,3258,3274,3285,3306,3348,3354,3356,3368,3371,3373,3388,3399,3421,3428,3449,3465,3478,3503,3526,3538,3558,3568,3585,3596,3636,3641,3656,3685,3712,3735,3768,3801,3843,3845,3895,3896,3945,3995,4025,4042,4047,4093,4109,4110,4116,4117,4132,4188,4240,4273,4286,4300,4307,4335,4386,4413,4417,4431,4444,4478,4501,4534,4545,4552,4562,4566,4575,4617,4628,4630,4639,4672,4679,4737,4740,4741,4745,4756,4771,4787,4799,4832,4873,4876,4898,4899,4917,4928,4938,4958,5010,5034,5038,5047,5050,5051) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]