SQL SERVER – 2012 – Summary of All the Analytic Functions – MSDN and SQLAuthority

SQL
7 Comments

SQL Server 2012 (RC0 Available here) has introduced new analytic functions. These functions were long awaited and I am glad that they are now here. Before when any of this function was needed, people used to write long T-SQL code to simulate these functions. But now there’s no need of doing so. Having available native function also helps performance as well as readability.

SQL SERVER - 2012 - Summary of All the Analytic Functions - MSDN and SQLAuthority ssfunction

In the last few days I have written many articles on this subject on my blog. The goal was to make these complex analytic functions easy to understand and make them widely accepted. As these new functions are available and as awareness spreads about them, we should start using these new functions. Here is a quick list of the new functions and relevant MSDN sites:

FunctionSQLAuthorityMSDN
CUME_DISTCUME_DISTCUME_DIST
FIRST_VALUEFIRST_VALUEFIRST_VALUE
LAST_VALUELAST_VALUELAST_VALUE
LEADLEADLEAD
LAGLAGLAG
PERCENTILE_CONTPERCENTILE_CONTPERCENTILE_CONT
PERCENTILE_DISCPERCENTILE_DISCPERCENTILE_DISC
PERCENT_RANKPERCENT_RANKPERCENT_RANK

I also enjoyed three different puzzles during the course of this series which gave a clear idea to the SQL Server 2012 analytic functions.

This series will always be my dear series as during this series I had went through a very unique experience of my book going out of stock and becoming available after 48 hours.

Reference: Pinal Dave (https://blog.sqlauthority.com)

SQL Function, SQL Server
Previous Post
SQL SERVER – Introduction to PERCENTILE_DISC() – Analytic Functions Introduced in SQL Server 2012
Next Post
SQL SERVER – Solution to Puzzle – Simulate LEAD() and LAG() without Using SQL Server 2012 Analytic Function

Related Posts

Leave a Reply