bp Interview Question

Two questions - one on SQL and another on Python