Deloitte interview question

Inner join and nested queries