Pregunta de entrevista de Discover

using or without using window function to solve sql questions