вам следует избегать свертывания
select country, year, profit
from (
SELECT '1' seq, GROUP_CONCAT(country) as country, year, SUM(profit) AS profit
FROM sales
GROUP BY seq, year ;
union
select '2', null, null, SUM(profit)
SELECT
FROM sales
) t
order bt t.seq, t.country