Knights plc Interview Question

How to optimise an sql query?