Cognizant interview question

Java 8 Coding, Sql queries,