问候,我很难将此查询转换为T-SQL,我将不胜感激
TRANSFORM Sum(ViewMaster.ServiceCount) AS SumOfServiceCount
SELECT ViewMaster.Response, Sum(ViewMaster.ServiceCount) AS [Total Of ServiceCount]
FROM ViewMaster
GROUP BY ViewMaster.Response
PIVOT ViewMaster.Month;
答案 0 :(得分:0)
以下内容:
SELECT *
FROM ( SELECT Response, ServiceCount, Month
FROM ViewMaster) VM
PIVOT(SUM(ServiceCount) FOR Month IN ('January','February',...,'December'))