一、题目
二、sql
SELECT name as '姓名',sum(case when subject='语文' then result END) AS '语文',sum(case when subject='数学'and result is not null then result END) AS '数学',sum(case when subject='英语' then result END) AS '英语' from student GROUP BY name
SELECT name as '姓名',sum(case when subject='语文' then result END) AS '语文',sum(case when subject='数学'and result is not null then result END) AS '数学',sum(case when subject='英语' then result END) AS '英语' from student GROUP BY name