American Express interview question

Question related to inner join for SQL