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(6,24,23,26,67,69,68,123,122,125,126,580,583,581,584,593,627,697,698,747,766,769,768,767,783,782,784,788,787,785,786,789,790,811,812,813,814,816,815,817,818,819,820,835,838,836,837,871,872,874,873,876,875,877,878,879,884,880,883,882,881,885,928,927,930,931,932,933,934,953,1032,1031,1033,1034,1035,1037,1038,1036,1041,1040,1039,1046,1114,1115,1129,1130,1132,1137,1212,1407,1406,1410,1408,1409,1411,1413,1412,1466,1775,1802,1801,1803,1804,1806,1808,1822,1825,1832,1833,1835,1847,1852,1859,1877,1893,1894,1895,1896), 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 (6,23,24,26,67,68,69,122,123,125,126,580,581,583,584,593,627,697,698,747,766,767,768,769,782,783,784,785,786,787,788,789,790,811,812,813,814,815,816,817,818,819,820,835,836,837,838,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,927,928,930,931,932,933,934,953,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1046,1114,1115,1129,1130,1132,1137,1212,1406,1407,1408,1409,1410,1411,1412,1413,1466,1775,1801,1802,1803,1804,1806,1808,1822,1825,1832,1833,1835,1847,1852,1859,1877,1893,1894,1895,1896) GROUP BY po.products_options_name, pov.products_options_values_name ORDER BY po.products_options_name, pov.products_options_values_sort_order]