RBC Interview Question

SQL queries - simple easy LC