Stats

180 Contributors: 6 Monday, January 9, 2017
Licensed under: CC-BY-SA
Not affiliated with Stack Overflow
Rip Tutorial: riptutorial@gmail.com
Roadmap: roadmap

Aggregate Functions

Introduction

Aggregate functions in SQL Server run calculations on sets of values, returning a single value.

Syntax

  • AVG([ALL|DISTINCT]expression)
  • COUNT([ALL|DISTINCT]expression)
  • MAX([ALL|DISTINCT]expression)
  • MIN([ALL|DISTINCT]expression)
  • SUM([ALL|DISTINCT]expression)

Related Examples