Kronsys interview question

How will you optimize sql query