Вы можете использовать apply
:
select col, sum(population)
from table t cross apply
( values (state, population), (country, population)
) tt(col, population)
group by col;
Вы также можете использовать union all
для других СУБД:
select t.state, sum(t.population)
from table
group by t.state
union all
select t.country, sum(t.population)
from table
group by t.country;