Cognizant Interview Question

oops concepts, sql sub queries