Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 1.65 KB

File metadata and controls

37 lines (31 loc) · 1.65 KB
title Analytic Functions (Transact-SQL)
description Analytic functions in Transact-SQL calculate an aggregate value based on a group of rows. Learn about the analytic functions in the SQL Database Engine.
author markingmyname
ms.author maghan
ms.reviewer randolphwest
ms.date 03/17/2026
ms.service sql
ms.subservice t-sql
ms.topic reference
ms.custom
ignite-2025
dev_langs
TSQL
monikerRange >=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric || =fabric-sqldb

Analytic functions (Transact-SQL)

[!INCLUDE sql-asdb-asdbmi-asa-pdw-edge-fabricse-fabricdw-fabricsqldb]

Analytic functions calculate an aggregate value based on a group of rows. Unlike aggregate functions, however, analytic functions can return multiple rows for each group. Use analytic functions to compute moving averages, running totals, percentages or top-N results within a group.

The Microsoft SQL Database Engine supports these analytic functions:

Related content