Pregunta de entrevista de Amazon

Some difficult advanced sql questions