MonetizeMore Interview Question

SQL query, python coding challenge