mysql逻辑分组行转列
表名(row_to_column)表结构如下:SQL直接查询即可得如上结果:SELECT * from row_to_column要达到查询效果如下结构:正解SQL如下即可:SELECT name as "姓名",max(case subject when "数学" then score end ) as "数学",max(case subject when "语文" then score end ) as "语文",max(case subject wh...
原创
2020-06-28 15:48:44 ·
4979 阅读 ·
0 评论