摘要:
转换前:idnamesubjectscore1张三语文802张三数学903李四数学854张三英语755李四语文856李四英语80转换后:姓名语文数学英语李四858580张三809075查询:SELECT * FROM( SELECT name as [姓名], SUM(CASE WHEN [subject] = '语文' THEN score END) AS [语文], SUM(CASE WHEN [subject] = '数学' THEN score END) AS [数学], SUM(CASE WHEN [subject] = '英语' TH 阅读全文