t-sql analytic functions

Post on 14-Feb-2016

75 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

T-SQL Analytic Functions. Kathi Kellenberger Pragmatic Works kkellenberger@pragmaticworks.com www.bidn.com/blogs/kathikellenberger. History. Window functions introduced 2005 Window functions enhanced 2012 Analytic Functions added 2012. Window Functions. Ranking Functions ROW_NUMBER() - PowerPoint PPT Presentation

TRANSCRIPT

T-SQL Analytic Functions

Kathi KellenbergerPragmatic Works

kkellenberger@pragmaticworks.com

www.bidn.com/blogs/kathikellenberger

History

• Window functions introduced 2005• Window functions enhanced 2012• Analytic Functions added 2012

Window Functions

• Ranking Functions• ROW_NUMBER()• RANK()• DENSE_RANK()• NTILE()

• Partitioning• Window aggregate functions

Enhancements

• ORDER BY to window aggregate functions• Framing: Rows and Range

The Analytic Functions

• LAG() and LEAD()• FIRST_VALUE() and LAST_VALUE()• PERCENT_RANK() and CUME_DIST()• PERCENTILE_DISC() and

PERCENTILE_CONT()

top related