Pergunta de entrevista da empresa Zendesk

How would you optimise a slow SQL query?