Hierarchical Ids - test sql