Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn The MAX() Function | Aggregate Functions
Introduction to SQL with unittests

bookThe MAX() Function

MAX() - This function returns the highest value in a particular column. Let's take a look at the following example:

12
SELECT MAX(population) FROM country;
copy

Here MAX() returns the largest population value in the country table.

Task

Swipe to start coding

Write an SQL query to get the largest value from the surfacearea column in the country table.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 5. ChapterΒ 5
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

What does the result of this query look like?

Can I use MAX() with other columns or data types?

How can I find the country with the highest population?

close

Awesome!

Completion rate improved to 2.44

bookThe 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:

12
SELECT MAX(population) FROM country;
copy

Here MAX() returns the largest population value in the country table.

Task

Swipe to start coding

Write an SQL query to get the largest value from the surfacearea column in the country table.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

close

Awesome!

Completion rate improved to 2.44
SectionΒ 5. ChapterΒ 5
single

single

some-alt