0
在SQL Server 2012中,我需要查询返回中每个元素的值,其中子句。SQL查询结果全部Where Where子句
select count(id) idCount, squad from dbo.Project
where id between 60000 and 80000
and status = ('Complete') and squad in ('Mechanical', 'Civil', 'Electrical', 'Architectural')
and fiscalyear = 2018
group by squad
order by squad asc
查询返回
idCount Squad
1 Civil
3 Electrical
3 Mechanical
我想什么输出为是
idCount Squad
0 Architectural
1 Civil
3 Electrical
3 Mechanical
非常感谢! –