MIN function [Aggregate]

Function

Returns the minimum expression value found in each group of rows.

Syntax

MINexpression
| DISTINCT column-name )

Parameters

expression The expression for which the minimum value is to be calculated. This is commonly a column name.

DISTINCT column-name Returns the same as MINexpression ), and is included for completeness.

Example

The following statement returns the value 24903.000, representing the minimum salary in the Employees table:

SELECT MIN ( Salary )
FROM Employees

Usage

Rows where expression is NULL are ignored. Returns NULL for a group containing no rows.

Standards and compatibility

See also

“MAX function [Aggregate]”

Chapter 2, “Using OLAP” in the System Administration Guide: Volume 2