Cognizant Interview Question

Regarding general coding and basic SQL questions.