Cognizant interview question

related java and sql ?