Only child node of given path (Except the given path) Query: select path from tree where path <@ 'a.b.c'; Result: Expected result: All the below node of a.b.c (In result don't needed a.b.c)
Tag: ltree
Query to group by maximum depth of PostgreSQL Ltree?
I want to query for all products with the name “Shania Twain”, but I want group them only by the tree with the deepest nlevel. Assuming I have a table like the following with the name categories So, for example, The problem lies with the HAVING clause requiring a boolean expression. The clause MAX(nlevel(cat.tree)) will return an integer. How do