Cognizant interview question

2 Coding and 2 Database SQL question