Block Interview Question

Two tables, last question was a basic windows function query