ZS Associates Interview Question

SQL puzzle questions