Morgan Stanley interview question

Database example