Search notes:

SQL: Aggregate functions

Aggregate functions can be used if either
An aggregate functions returns one record per group. This is different from an analytic function which returns a value for each record (and the value is still computed from multiple records).
The SQL standard defines five aggregate functions:
RDBMS Vendors might provide additional aggregate functions, such as

HAVING clause

Values that are produced by an aggregate functions can be filtered from the result set with the having clause (not the where clause).

See also

group by
The ExecuteScalar() method in the .NET class System.Data.Common.DbCommand is a convenient way to query a value from a single-row, single-column result set (in .NET, that is).
The Power Query standard library function Table.Profile.

Index