Cognizant interview question

one math question and sql querry and some opps conceot