COUNT Aggregate Function TSQL Tutorial

COUNT Example:

CONTRACT_IDAMOUNT
1400
2500
3700

SELECT COUNT(c.contract_id) AS CountContracts
   FROM contracts c
WHERE c.amount > 400 ;

CountContracts
2

See also: T-SQL Functions -> Avg -> Max -> Min -> Sum