select c0,sum(c1) as c1,sum(c2) as c2 from
(
select c0,sum(c1) as c1,0 as c2 from t1 group by c0
union
select c0,0 as c1 ,sum(c2) as c2 from t1 group by c0
) c
group by c0
(
select c0,sum(c1) as c1,0 as c2 from t1 group by c0
union
select c0,0 as c1 ,sum(c2) as c2 from t1 group by c0
) c
group by c0