Porter interview question

SQL : mainly joins and subquery Python : pandas