MSCI Interview Question

SQL question on self join.