MonetizeMore interview question

SQL query, python coding challenge