Bank of America interview question

case study with SQL