Nomura interview question

Q: Given two tables, query something.