HCLTech Interview Question

How to optimize an SQL query