Sectie 2. Hoofdstuk 1
single
SQL Min and Max
Veeg om het menu te tonen
Aggregate Functions
There are functions in SQL that returns single line result among a group of the rows. These functions are called aggregate functions.
MIN() and MAX() functions return the minimum and maximum result from the query, and this is always a single line.
Let's find the release date of the oldest song in our table:
1SELECT MIN(year) FROM songs
Now, let's select the price of the most expensive song of 21st century:
12SELECT MAX(price) FROM songs WHERE year > 2000
Taak
Swipe to start coding
Find the price of the most expensive song.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 2. Hoofdstuk 1
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.