Pregunta de entrevista de Amazon

SQL window function and different types of joins