Assume the following schema:
Write a query to retrieve theartist
along with maxRank
, title
, and whether the artist is a remixer
. The result should only contain rows with maxRank
greater than 50.artist
in increasing order, and limit your response to 4 rows. The results should look like the following:
artist | maxRank | title | remixer |
---|---|---|---|
1467 | 92 | 30 Years At Sea | False |
4432 | 68 | 2soul | True |
10297 | 97 | Fusion Love | True |
12649 | 59 | The Clown feat. Pedestrian | False |
charts
and songs
and artist_songs
to get all the information we need:
SELECT distinct artist, maxRank, title, remixer
FROM charts t1 INNER JOIN songs t2
ON t1.trackid = t2.trackid AND t1.maxRank > 50
INNER JOIN artist_songs t3 ON
t2.trackid = t3.trackid
order by artist
limit 4
artist | maxRank | title | remixer |
---|---|---|---|
1467 | 92 | 30 Years At Sea | False |
4432 | 68 | 2soul | True |
10297 | 97 | Fusion Love | True |
12649 | 59 | The Clown feat. Pedestrian | False |