标签:png bsp cas rom weight style name ase user
数据库设计类似于这种结构
要求通过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
标签:png bsp cas rom weight style name ase user
原文地址:https://www.cnblogs.com/yangwanhao/p/13055245.html