American Express Interview Question

Question related to inner join for SQL