[Question] Top 2 Players per Platform

Question: Inspect the table logged_plays attached to this community post. Write a query that pulls the top 2 users with the largest number of plays in each platform. Avoid using unions in your final solution.

Original Table:

 

Desired Output:

 


Ready for the solution? Click here!

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • [Spoiler] Is there a solution that doesn't involve Window function? I don't think there is but just wondering!

    Reply Like
      • Neha Kumar
      • Solutions Engineer
      • Neha_Kumar
      • 1 mth ago
      • Reported - view

      Zachary Thomas There is one but it requires unions! Think select top 2 from all web platform users, unioned to select top 2 from android users, unioned to select top 2 from iOS users

      Reply Like
Like Follow
  • 1 mth agoLast active
  • 2Replies
  • 203Views
  • 2 Following