Sql 单表查询问题,如下题目,有什么简单的方法?

图片说明

select 原价C, max(case 月份 when 1 THEN 单价 ELSE null end) as '1月', max(case 月份 when 2 THEN 单价 ELSE null end) as '2月', max(case 月份 when 3 THEN 单价 ELSE null end) as '3月', max(case 月份 when 4 THEN 单价 ELSE null end) as '4月' from tb GROUP BY 原价C ORDER BY 原价C;

select 原价C, max(case 月份 when 1 THEN 单价 ELSE 0 end) as '1月', max(case 月份 when 2 THEN 单价 ELSE 0 end) as '2月', max(case 月份 when 3 THEN 单价 ELSE 0 end) as '3月', max(case 月份 when 4 THEN 单价 ELSE 0 end) as '4月' from tb GROUP BY 原价C ORDER BY 原价C;