Citi interview question

How to optimize a slow SQL query ?