Maintain the top parent record in a hierarchy. Here we specify the hierarchy level in the query as we traverse the hierarchy. Ultimately we can select only the records at the highest level giving us the top parent record at every step in the hierarchy.