MIN & MAX - Aggregate Functions1 / 10
Aggregate functions in SQL look at many rows and return a single result. MIN and MAX are examples of aggregate functions. To get the minimum height in the landmarks table, try:
SELECT MIN(height_meters) FROM landmarks;| landmark_id | landmark_name | height_meters | borough |
|---|---|---|---|
| 1 | Statue of Liberty | 93 | Manhattan |
| 2 | Empire State Building | 381 | Manhattan |
| 3 | Brooklyn Bridge | 84 | Brooklyn |
| 4 | Chrysler Building | 319 | Manhattan |
| 5 | One World Trade Center | 541 | Manhattan |
Ctrl+Enter to submit
MIN & MAX - Aggregate Functions - Free SQL Practice Online
Practise MIN & MAX - Aggregate Functions with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.