Based on the schemas below (open image in new tab to explore), run any queries you like.
If you are looking for inspiration, check out the list of suggested queries below, or try the guided SQL playground.
artist
along with maxRank
, title
, and whether the artist is a remixer
. artist
. House
or Techno
. Limit your response to 3.
title
of a song followed by “->” followed by the subtitle of the song. Limit your response to 2 rows. The query should only return one column.
+2 points per content they created
+1 point per like their content received
+3 points per comment activity they made
Compute the total engagement score per user and rank all users by score in descending order. Include their rank.
Keep only the top 5 users with the highest engagemnt.
price
greater than the average price of the songs of genre House
. Limit your response to 5 songs ordered by title
. The price
should be rounded to 2 decimal places. House
that have price
greater than the average price of the songs of genre House
, along with the average price of genre House
rounded to 2 decimal points. Limit your response to 5 songs ordered by title. Number of users they follow
Number of users who follow them
Their follower-to-following ratio (round to 2 decimal places)
Filter for only followers who have at least one follower and at least one following.
genre
and limit your response to 5 rows. Return both the title
of the song and whether the song is recent. Assume that some songs have missing values on their released day; you can ignore those. Tip: You can estimate the starting date of the past 6 years by using now() - INTERVAL 6 YEAR
.
content_id
and content_text
) that received
the highest number of likes. If the user has multiple top-liked contents, return all of them. Order the results by user_id
.
durationInCharts
greater than the average durationInCharts
(rounded up to 1 decimal point) of songs that have entered the charts before them. genre != -1
), and we would also like to focus on popular genres, that have at least 8 songs. Return the result in decreasing order of the most popular genre, and limit your response to five rows. trackId
of the songs that ranked between \(1^{st}\) and \(50^{th}\) place in the charts. Limit your answer to 4.
durationInCharts
greater than the all the durationInCharts
of songs of genre Breaks
. Order the results by their durationInCharts
in decreasing order.