【发布时间】:2017-01-27 16:15:45
【问题描述】:
以下是我的查询和结果列,但不知道如何添加查询以获取总列。
Select
case PlacementVerificationmethod
when 107 then 'contact center'
when 1 then 'work number/3rd party verification'
when 101 then 'Placement call'
when 102 then 'walk in/Self report'
when 103 then 'Email'
when 104 then 'Employer Report'
when 105 then 'In person with participant'
when 106 then 'In person with employer'
else 'unknown'
end as 'Placement method',
count(*) as 'Total Placement'
from
AssessEmploymentPlacement
group by
PlacementVerificationMethod
结果:
In person with employer 145
Placement call 13813
work number/3rd party verification 3492
Employer Report 4463
In person with participant 168
unknown 61387
walk in/Self report 2227
Email 115
【问题讨论】:
标签: sql sql-server count sum case