1) Set up a table external to Plutus that records the relationships of the accounts, and group by id
2) Use the account names to express the hierarchy, and use LIKE when querying by name
Both work for my use case (and I can go into more detail if you like), but I am not using the built-in views. These would likely have to be modified.