bp interview question

Two questions - one on SQL and another on Python