Tech Mahindra interview question

Oops + sql + javascript