PwC Interview Question

SQL self joins. Basic pandas.