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(345,479,1051,766,258,508,1118,1046,527,936,905,635,217,289,771,956,444,381,550,579,738,758,975,873,1114,4154,3738,4334,4451,3948,4162,4175,4071,4282,3871,3715,3802,3765,4322,4167,4072,4076,4041,4327,1980,1254,1348,1558,1866,1841,2024,1569,1177,1220,1838,3762,4304,3954,4087,4443,4186,3868,3938,4283,3899), 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 (217,258,289,345,381,444,479,508,527,550,579,635,738,758,766,771,873,905,936,956,975,1046,1051,1114,1118,1177,1220,1254,1348,1558,1569,1838,1841,1866,1980,2024,3715,3738,3762,3765,3802,3868,3871,3899,3938,3948,3954,4041,4071,4072,4076,4087,4154,4162,4167,4175,4186,4282,4283,4304,4322,4327,4334,4443,4451) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]