Skip to content

Comment on A Different Type of SQL Recursion with PostgreSQL

Comments

It seems like the first variant is overly complicated. When you write about set theory you should be able to figure out that you don't have to rely on the effects of the union operator, the result you want is a simple difference with previous levels of the recursive cte, or a terminal query that groups by the table and shows the minimum level

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.