Groeperen
In deze laatste oefening combineer je GROUP BY met aggregatiefuncties zoals MIN die je eerder in dit hoofdstuk hebt gezien.
Om dit hoofdstuk af te ronden, keren we terug naar de tabel eurovision uit het eerste hoofdstuk.
Deze oefening maakt deel uit van de cursus
Introductie tot SQL Server
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
-- Retrieve the minimum and maximum place, and point values
SELECT
-- the lower the value the higher the place, so MIN = the highest placing
MIN(place) AS hi_place,
___(place) AS lo_place,
-- Retrieve the minimum and maximum points values. This time MIN = the lowest points value
___(points) AS min_points,
MAX(points) AS max_points
FROM
eurovision;