What is the most efficient/elegant way to parse a flat table into a tree? What is the most efficient/elegant way to parse a flat table into a tree? sql sql