Alright, I'm trying to make a query for a library that will show which students have never borrowed a book. For this, I have done the following:
SELECT
LEERLINGEN.LLNR,
LEERLINGEN.VOORNAAM,
LEERLINGEN.TUSSENVOEGSEL,
LEERLINGEN.ACHTERNAAM,
LEERLINGEN.KLAS,
COUNT(*) AS AANTAL
FROM
UITLENINGEN
INNER JOIN LEERLINGEN ON UITLENINGEN.LLNR = LEERLINGEN.LLNR
GROUP BY
LEERLINGEN.LLNR,
LEERLINGEN.VOORNAAM,
LEERLINGEN.TUSSENVOEGSEL,
LEERLINGEN.ACHTERNAAM,
LEERLINGEN.KLAS
HAVING
COUNT(*) = 0;
This doesn't seem to work for some reason, as all it does is create an empty table when I click Execute.
What did I do wrong here?