MIN() aggregate function takes the name of a column as an argument and returns the smallest value in a column.
SELECT MIN(column_name)FROM table_name;
The opposite of
For instance, suppose there’s a
transactions table with the following values:
The given query will return the smallest value from the
SELECT MIN(amount)FROM transactions;
The result would be:
Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.
- Anonymous contributors
Learn SQL on Codecademy
Analyze Data with SQLLearn to analyze data with SQL and prepare for technical interviews.
Includes 8 Courses
- Anonymous contributorsAnonymous contributors