Skip to content

Latest commit

 

History

History
35 lines (30 loc) · 1.68 KB

File metadata and controls

35 lines (30 loc) · 1.68 KB
title Analytic Functions (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 07/24/2017
ms.prod sql-non-specified
ms.reviewer
ms.suite
ms.technology
database-engine
ms.tgt_pltfrm
ms.topic language-reference
dev_langs
TSQL
ms.assetid 60fbff84-673b-48ea-9254-6ecdad20e7fe
caps.latest.revision 5
author BYHAM
ms.author rickbyh
manager jhubbard

Analytic Functions (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2012-all_md]

SQL Server supports the following analytic functions. Analytic functions compute an aggregate value based on a group of rows. However, unlike aggregate functions, they can return multiple rows for each group. You can use analytic functions to compute moving averages, running totals, percentages or top-N results within a group.

CUME_DIST (Transact-SQL) LEAD (Transact-SQL)
FIRST_VALUE (Transact-SQL) PERCENTILE_CONT (Transact-SQL)
LAG (Transact-SQL) PERCENTILE_DISC (Transact-SQL)
LAST_VALUE (Transact-SQL) PERCENT_RANK (Transact-SQL)

See also

OVER Clause (Transact-SQL)