J.P. Morgan interview question

Data base query optimization