Hierarchical Query - Build data from resultset