WITH RSFC(ITERATION,RUNNING_FACTORIAL) AS
( SELECT NUM AS ITERATION, 1 AS RUNNING_FACTORIAL FROM NUMBERS WHERE NUM =1
UNION ALL
SELECT R.ITERATION +1,
R.RUNNING_FACTORIAL * B.NUM
FROM RSFC R
INNER JOIN NUMBERS B
ON (R.ITERATION+1) = B.NUM
)
SELECT iteration,running_factorial FROM rsfc