Vivid Seats Interview Question

How do you optimize a query?