【发布时间】:2015-04-10 15:50:52
【问题描述】:
我的原始数据看起来像
Class Cert Name Benefit Coverage
-------------------------------
1 1001 ABC EHC Family
1 1001 ABC DEN Family
2 1002 XYZ EHC Single
2 1002 XYZ DEN Single
3 1003 LMN EHC Couple
3 1003 LMN DEN Couple.
我希望最终输出看起来像
**Class** **Benefit**
EHC-Single EHC-Couple EHC-Family DEN-Single DEN-Couple DEN-Family
1 1 1
2 1 1
3 1 1
列下方的值是证书的计数。
【问题讨论】:
标签: sql-server-2008-r2 pivot-table crosstab