Pregunta de entrevista de Spotify

SQL case, gave some hypothetical scenario, asked to code