MAX() aggregate function takes the name of a column as an argument and returns the largest value in a column.
SELECT MAX(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 largest value from the
SELECT MAX(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