Trending Approach: For each track under a label, calculate the total number of streams for this week and the previous week. Do an inner join on the two datasets (this week and last week) which removes tracks that did not have any streams in the previous week (such as new releases). Calculate the delta streams (this week-last week streams), sort by desc, and take the top ten tracks with the highest delta and call this your "trending" tracks. Join with dim tables to pull in any metadata
Things to consider: What should be our source table? fact_analytics, staging_sos, or summary_sos? Right now I'm using fact_analytics. Adding parameters for subaccount id and artist id
Initial QA: Looks good so far, a lot of the trending tracks were placed on playlists within the past week. Looked at Red Bull Records (Label ID 21975) and the track "Fake Nice" appears on the trending list, which was recently released and placed on a few playlists.