Multiple columns from single table
You can use a SUM(CASE) statement and a GROUP BY in this way:

select 
    date,
    sum(case when category = 1 then price else 0 end) as blue,
    sum(case when category = 2 then price else 0 end) as red
from
    data d
group by
    date