Learn SQL Lesson

MAX Finds the Largest Value

`MAX` returns the largest value in a column.

SELECT MAX(amount) AS largest_sale
FROM sales

This is helpful for questions like “What was the biggest order?” or “What is the latest date in the dataset?”

Practice challenge

Return the largest sale amount as largest_sale.

Open interactive editor