SQL Server aggregated report example

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 @ Sunday, September 16, 2007 4:16 PM

Print

Comments on this entry:

# re: SQL Server aggregated report example

Left by türk porno izle at 3/26/2009 7:59 PM
Gravatar
Good example, thanks...

# re: SQL Server aggregated report example

Left by SMF Destek at 3/26/2009 10:28 PM
Gravatar
Hı :) Thank you good post...

SMF Destek

Your comment:



 (will not be displayed)


 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345