Lightspeed Interview Question

How do you go about optimizing a sql query?