For SQL Hierarchical Data, How To Show Only Tree Branches Including Certain Type Of Entities And Discard Others

If you have a tree of entities represented into a SQL database into parent-child relation as in the image above, you may need to be able to view only the tree branches which include a certain type of entities and discard the branches which don't include this type. For example, let's have a look on the tree above and assume that we need to show only the branches which include the "J" type of entities. For this to happen, then we need to transfer...