Pregunta de entrevista de Lightspeed

How do you go about optimizing a sql query?