Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select a2.AlbumName, (select count(rc.AlbumID) from Recommendation rc where rc.AlbumID = r.RecommendationID) as AlbumsSold
- from Album a left join Recommendation r on r.AlbumID = a.AlbumID JOIN Album a2 ON r.RecommendationID = a2.AlbumID
- where a.AlbumName like 'U2%'
- group by r.RecommendationID
- order by AlbumsSold desc
Advertisement
Add Comment
Please, Sign In to add comment