Block interview question

Two tables, last question was a basic windows function query