Is there a more efficient or something in better practice to get counts than what I am doing below?
select
i.org_id,
o.Org_Name_1,
count(*) as 'Total Users',
SUM(CASE WHEN i.email is NULL THEN 1 ELSE 0 END) as 'No Email'
from
individu i,
organiz o
where
i.org_id = o.org_id
group by
i.org_id, o.Org_Name_1
order by
count(*) desc
can be replaced with because… Quoted from MSDN Count(Transact SQL)
When an expression is place in the parenthesis of the COUNT statement, it will evaluate and count only non-null values in that field. Therefore, if you take Count(*) – Count(field) you get the total of all null fields.
Your Query would then look like this: