Morgan Stanley Interview Question

You have a database and then write a query for some specific task.