Please have a look at my picture in which I have tried to explain what I want to achieve: each column should be the sum of values within the country and category. How will you suggest I solve this problem? There must be a standard approach by SQL user that I have overlooked.
I know I can work my way around it by something like
case when category = 'CatA' then sum(value) as 'CatA'
and then a group by
but when my categories are too many this solution will be messy I will avoid it.
I am using Oracle SQL and Toad
EDIT: I have two answers but I think I have mis communicated what I whish. Basically what I wish to achieve is to avoid type in the categories manually.