I have a self referencing Person table.
Level 0 "L0" are the top parents (they have no parents).
Level 1 "L1" are children with a parent whose parent has no parent
and so on...
Given an entity like this:
Person
--PersonPK
--ParentFK (links to PersonPK)
--Name
I use this SQL to get only the L1 level.
SELECT L1.PersonPK, L1.ParentFK, L1.name
FROM tb_people AS L0 INNER JOIN
tb_people AS L1 ON L1.ParentFK= L0.PersonPK
WHERE (L0.ParentFK IS NULL)
Is this possible in LLBL? How?