DXC Technology interview question

Coding , sql query, oops