stored procedure calculate factorial – Query Examples