MIN function [Aggregate]

Function

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

Syntax

MIN ( expression
| 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 MIN ( expression ), and is included for completeness.

Example

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

SELECT MIN ( salary )
FROM employee

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 4, “Using OLAP” in the Sybase IQ Performance and Tuning Guide