State Street interview question

Basic Sql