Citi Interview Question

How to optimize a slow SQL query ?