Cognizant Interview Question

one math question and sql querry and some opps conceot