Virtusa interview question

DBMS - Various problems and their queries. Write a code for factorial number.