Deutsche Bank interview question

Java program, streams, collection and sql query