Kronsys Interview Question

How will you optimize sql query