American Express interview question

SQL queries