Anonymous Interview Question

they asked me to write some DBMS query.