Cognizant interview question

Related to oops , sql