Tech Mahindra interview question

SQL performance java streams operation