The MAX() Function
MAX()
- This function returns the highest value in a particular column. Let's take a look at the following example:
12SELECT MAX(population) FROM country;
Here MAX()
returns the largest population value in the country
table.
Swipe to start coding
Write an SQL query to get the largest value from the surfacearea
column in the country
table.
Solution
Thanks for your feedback!
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
What other aggregate functions can I use in SQL?
Can I use MAX() with a WHERE clause?
How do I find the country with the highest population?
Awesome!
Completion rate improved to 2.44
The MAX() Function
Swipe to show menu
MAX()
- This function returns the highest value in a particular column. Let's take a look at the following example:
12SELECT MAX(population) FROM country;
Here MAX()
returns the largest population value in the country
table.
Swipe to start coding
Write an SQL query to get the largest value from the surfacearea
column in the country
table.
Solution
Thanks for your feedback!
Awesome!
Completion rate improved to 2.44single