Vivid Seats interview question

How do you optimize a query?