Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Articles with tag Aggregates Rss

Search for any content tagged aggregates

   Items 1 to 13 of 13   
 

A genuine use for a SQL CLR Aggregate

When should you use a SQL CLR Aggregate? Lots of people have struggled with this one, but David Poole found a use, and has some interesting performance data analysis as well.  Read more...
By David Poole 2014/02/05 (first published: 2010/12/29) | Source: SQLServerCentral.com | Category: sqlclr
Rating: |  Discuss |   Briefcase | 14,249 reads

Generating SubTotals using GROUPING

This article explains how to use the GROUPING clause to generate subtotals for rows in a very easy fashion.  Read more...
By Sunil Chandurkar 2012/11/16 (first published: 2010/07/13) | Source: SQLServerCentral.com | Category: groouping
Rating: |  Discuss |   Briefcase | 26,563 reads

Aggregate Function Product()

The TSQL aggregate function SUM() gives a number based on the addition of the values of multiple rows to each other. Do the same thing but with multiplication instead of addition.   Read more...
By Paul McPherson 2012/02/06 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 8,356 reads

Cumulative Aggregates in SQL Server Reporting Services

In this tip, we will see how to build a report which shows the cumulative sales amount for the current month, current quarter (QTD) and current year (YTD) in a single crosstab (tablix) report, which makes it easy to compare the data.  Read more...
By Additional Articles 2012/01/27 | Source: MSSQLTips.com | Category: aggregates
Rating:  Rate this |   Briefcase | 2,149 reads

How to get monthly YTD data

This article presents an easy method to get YTD data grouped by months in T-SQL.  Read more...
By Kautuk 2012/01/24 | Source: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 11,200 reads

Script to calculate the Median value for SQL Server data

The standard SQL language has a number of aggregate functions like: SUM, MIN, MAX, AVG, but a common statistics function that SQL Server does not have is a built-in aggregate function for median. The median is the value that falls in the middle of a sorted resultset with equal parts that are smaller and equal parts that are greater. Since there is no built-in implementation for the median, the following is a simple solution I put together to find the median.   Read more...
By Additional Articles 2011/11/08 | Source: MSSQLTips.com | Category: aggregates
Rating:  Rate this |   Briefcase | 2,375 reads

A genuine use for a SQL CLR Aggregate

When should you use a SQL CLR Aggregate? Lots of people have struggled with this one, but David Poole found a use, and has some interesting performance data analysis as well.  Read more...
By David Poole 2014/02/05 (first published: 2010/12/29) | Source: SQLServerCentral.com | Category: sqlclr
Rating: |  Discuss |   Briefcase | 14,249 reads

Generating SubTotals using GROUPING

This article explains how to use the GROUPING clause to generate subtotals for rows in a very easy fashion.  Read more...
By Sunil Chandurkar 2012/11/16 (first published: 2010/07/13) | Source: SQLServerCentral.com | Category: groouping
Rating: |  Discuss |   Briefcase | 26,563 reads

Pivoting, Unpivoting and Aggregating

We asked Phil Factor to write a nice simple quick-start guide about aggregation, pivoting and un-pivoting techniques. To do so, he takes us all the way from getting the data from a published source, transferring it to SQL Server, un-pivoting it, storing it in a relational table, aggregating it and finally pivoting the data in a variety of ways.  Read more...
By Additional Articles 2009/11/18 | Source: SimpleTalk | Category: aggregates
Rating:  Rate this |   Briefcase | 4,082 reads

Median Workbench

SQL Server database engine doesn't have a MEDIAN() aggregate function. This is probably because there are several types of median, such as statistical, financial or vector medians. Calculating Medians are essentially a row-positioning task, since medians are the middle value of an ordered result. Easy to do in SQL? Nope. Joe Celko explains why.  Read more...
By Additional Articles 2009/05/06 | Source: SimpleTalk | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 1,645 reads

Summarizing Data with Aggregate Queries - SQL School Video

Learn how to summarize the values of your data using aggregate functions such as COUNT(), SUM(), and AVG() from MVP Kathi Kellenberger. Grouping and aggregate filters are covered as well.  Read more...
By Kathi Kellenberger 2008/08/28 | Source: SQLServerCentral.com | Category: video
Rating: |  Discuss |   Briefcase | 4,789 reads

Calculating Mathematical Values in SQL Server

In our application we have the need to perform mathematical calculations. Right now we are doing so in our front end application. Unfortunately we are starting to experience performance problems with large data sets and differences in calculations due to developers using different logic. We are seeking some other options to perform the calculations. Does SQL Server perform basic mathematical calculations?  Read more...
By Additional Articles 2008/08/07 | Source: MSSQLTips.com | Category: t-sql
Rating:  Rate this |   Briefcase | 4,867 reads

Aggregating Correlated Sub-Queries

Every now and then you may attempt to calculate an aggregate function -- such as SUM() -- on a correlated subquery, only to encounter the following error:  Read more...
By Additional Articles 2007/10/29 | Source: SQLTeam.com | Category: t-sql
Rating: (not yet rated)  Rate this |   Briefcase | 4,280 reads
   Items 1 to 13 of 13