having count with join
问题 I want to find out which playlist have more than 2 songs. The statement works but I want the name of the playlist and the count() for the songs displayed. I think i have to use a join but I didn't get it how this should work. Can someone helps please? playlist table ++++++++++++++ id name playlist_songs table ++++++++++++++++++++ song_id playlist_id SELECT p.name FROM playlist p WHERE p.id in (SELECT s.playlist_id counter FROM playlist_songs s group by playlist_id having count(song_id)>2);