Recursive queries

Other topics

Sum of Integers

WITH RECURSIVE t(n) AS (
    VALUES (1)
  UNION ALL
    SELECT n+1 FROM t WHERE n < 100
)
SELECT sum(n) FROM t;

Link to Documentation

Contributors

Topic Id: 9025

Example Ids: 28039

This site is not affiliated with any of the contributors.