Sql Query:
select Song.name as Song, Band.name as Band
from Song join BandOnSong on Song.Id = BandOnSong.songId
join Band on BandOnSong.bandId = Band.Id;
结果:
Song Band
Live Forever Oasis
Penny Lane The Beatles
Penny Lane Test
Where is My Mind Pixies
预期结果:
Song Band
Live Forever Oasis
Penny Lane The Beatles, Test
Where is My Mind Pixies
如何获得预期结果?我尝试在Song.name上使用一个组,但是我做错了。