Circle K interview question

How to optimize a slow SQL query,