BNY Interview Question

Hacker Rank test using SQL