Domanda di colloquio di Block

Two tables, last question was a basic windows function query