Geeks With Blogs
AngelEyes on .Net Tips, tricks and WTFs about Asp .Net, SQL Server and the likes.

An example of how to make an aggregated report, grouping together by values:


    select  count(*) as total ,
        count(case WHEN others = 1 THEN 1 END)    as [one url],
        count(case WHEN others = 2 THEN 1 END)    as [two urls],
        count(case WHEN others = 3 THEN 1 END)    as [three urls],
        count(case WHEN others > 3 THEN 1 END)    as [all the rest]
        from #temp2
Posted on Sunday, September 16, 2007 4:16 PM | Back to top


Comments on this post: SQL Server aggregated report example

# re: SQL Server aggregated report example
Requesting Gravatar...
Good example, thanks...
Left by türk porno izle on Mar 26, 2009 7:59 PM

# re: SQL Server aggregated report example
Requesting Gravatar...
Hı :) Thank you good post...

SMF Destek

Left by SMF Destek on Mar 26, 2009 10:28 PM

# re: SQL Server aggregated report example
Requesting Gravatar...
Hi, Its really a nice example. Thank you very much
Left by Tc on Oct 22, 2010 12:05 AM

# re: SQL Server aggregated report example
Requesting Gravatar...
Thanks for the post. nice
Left by Trxbox on Dec 11, 2010 7:58 PM

# re: SQL Server aggregated report example
Requesting Gravatar...
This is a nice post but after carefully following the links posted, some are irrelevant and some are not free and that is misguiding information.
Left by sanalcadı on Feb 08, 2011 4:59 PM

Your comment:
 (will show your gravatar)


Copyright © AngelEyes | Powered by: GeeksWithBlogs.net