Dette er en af fordelene ved at bruge JOIN
over IN
prædikat:
SELECT
p.name,
COUNT(song_id) counter
FROM playlist p
INNER JOIN playlist_songs s ON p.id = s.playlist_id
GROUP BY playlist_id
HAVING COUNT(song_id) > 2;
Dette er en af fordelene ved at bruge JOIN
over IN
prædikat:
SELECT
p.name,
COUNT(song_id) counter
FROM playlist p
INNER JOIN playlist_songs s ON p.id = s.playlist_id
GROUP BY playlist_id
HAVING COUNT(song_id) > 2;