SET NOCOUNT ON;
select
sum(case when PctUp between 4 and 6 then 1 else 0 end) as Count1
,sum(case when PctUp between 4 and 8 then 1 else 0 end) as Count2
from Exceptions where pctUp between 4 and 8;
END
Returns:
Count1 Count 2
451 672
Would like to return:
ExceptionCount LowPct HighPct
451 4 6
672 4 8
How can this be done?
Thanks,