We are in Beta and we are offering 50% off! Use code BETATESTER at checkout.
You can access a significantly larger sample of the platform's content for free by logging in with your Gmail account. Sign in now to explore.

Artist maxranks

SQL Easy

Assume the following schema:

Write a query to retrieve the artist along with maxRank, title, and whether the artist is a remixer. The result should only contain rows with maxRank greater than 50.
Order the result by 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
We can join tables 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
Topics

Join
Similar questions

Provide feedback