select
uniquecount = sum(case when cnt = 1 then 1 else 0 end),
nonuniquecount = sum(case when cnt > 1 then 1 else 0 end)
from (
select name, cnt = count(*) from tblTest group by name
) x
[COLOR=black #e0e0e0]For SQL and technical ideas, visit my blog, Squared Thoughts.
The best part about anything that has cheese is the cheese.[/color]
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.