The function MIN returns the minimum value of items in a group. Without a
GROUP BY clause it will aggregate with all rows of the SELECT.
SQL Syntax:
|
|
MIN( expression ) |
Parameters:
|
|
expression
A expression of any data type without a aggregate function.
|
Return Type:
|
|
the same as the expression. |
Examples:
SELECT MIN( price ) FROM mytable
SELECT MIN( price ) FROM mytable
SELECT MIN( price ) FROM mytable t GROUP BY t.name
see also:
MAX
SQL Aggregate Functions
|