InfoCepts Interview Question

Query related to SQL optimization