数据库设计类似于这种结构
要求通过SQL查询出如下结构的数据:
其SQL语句如下
SELECT username, MAX(CASE course WHEN 'chinese' THEN score ELSE 0 END) AS '语文', MAX(CASE course WHEN 'math' THEN score ELSE 0 END) AS '数学', MAX(CASE course WHEN 'english' THEN score ELSE 0 END) AS '英语' FROM score GROUP BY username