SQL - Common Table Expressions (CTEs)
What is wrong with this recursive CTE?
WITH RECURSIVE Tree AS (SELECT id, parent_id FROM Nodes WHERE parent_id IS NULL UNION ALL SELECT n.id, n.parent_id FROM Nodes n JOIN Tree t ON n.id = t.parent_id) SELECT * FROM Tree;
