Anonymous interview question

they asked me to write some DBMS query.