American Express interview question

Sql on joints. Pandas operations in python