Cognizant interview question

oops concepts, sql sub queries