Microsoft SQL ServerAggregate 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)