Cognizant interview question

Basic sql joins and Oops concepts