HARMAN Interview Question

Factorial, sql