Pregunta de entrevista de Amazon

SQL queries based on rank functions