Cognizant Interview Question

Based on MySql , Programming and algorithms