The MySQL MIN()
function is an aggregate function that returns the minimum value from an expression.
Typically, the expression would be a range of values returned as separate rows in a column, and you can use this function to find the minimum value from the returned rows. If there are no matching rows, MIN()
returns NULL
.
For example, you can use this function to find out which city has the smallest population out of a list of cities.