Pregunta de entrevista de United Airlines

Some sql queries on group by, and windows functions