An
aggregate query[1] is one that contains a specific
Transact-SQL function that performs a calculation on a set of values. This calculation is returned by the query as a single value. For example, if you wanted to know how much you are paying out in salaries, you could ask for the total of all values in the
Salary column in the
Employees table. Aggregates are used in conjunction with the GROUP BY clause.
There are a couple of attributes to remember about these functions. Each of the functions ignore null values, except for the COUNT
function. Also, each of the functions uses the following syntax: