The MIN() Function
MIN()
- this function returns the lowest value in a particular column.
Let's look at an example:
12SELECT MIN(population) FROM country;
Here, MIN()
returns the smallest population value in the country table.
Swipe to start coding
Write an SQL query to get the smallest 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
Can you explain how MIN() works with other columns?
What happens if there are NULL values in the population column?
Can I use MIN() with GROUP BY to find the minimum for each group?
Awesome!
Completion rate improved to 2.44
The MIN() Function
Swipe to show menu
MIN()
- this function returns the lowest value in a particular column.
Let's look at an example:
12SELECT MIN(population) FROM country;
Here, MIN()
returns the smallest population value in the country table.
Swipe to start coding
Write an SQL query to get the smallest value from the surfacearea
column in the country
table.
Solution
Thanks for your feedback!
single