Open this example in the interactive library
Source code
WITH RECURSIVE f(n,v) AS (VALUES(1,1) UNION ALL SELECT n+1,v*(n+1) FROM f WHERE n<5) SELECT v FROM f ORDER BY n DESC LIMIT 1;
Sample output
[
{
"v": 120
}
]
Open this example in the interactive library
WITH RECURSIVE f(n,v) AS (VALUES(1,1) UNION ALL SELECT n+1,v*(n+1) FROM f WHERE n<5) SELECT v FROM f ORDER BY n DESC LIMIT 1;
[
{
"v": 120
}
]