Fidelity Investments interview question

Sql based queries