declare @t table(id int,c1 int,c2 int)
insert @t select 0,1,0 union all
select 1,1,1 union all
select 2,0,0 union all
select 3,0,0 union all
select 4,1,1
select count(*) as total1 from @t where c1=1 union all
select count(*) as total2 from @t where c2=1