Zensar Technologies interview question

DBMS query