标签: sql pivot-table
我有一个带有以下值的简单表
我希望输出为:
答案 0 :(得分:1)
SELECT Name, Filter1, Filter2 FROM (SELECT Name, Attribute, Value FROM PivotEx) AS SourceTable PIVOT ( MAX(Value) FOR Attribute IN (Filter1, Filter2) ) AS PivotTable