Incedo interview question

Basic Java8 stream and SQL query, few OOPs concept