I have a table where products are classified based on hierarchical relationships such as a tree structure. I need to select a category and all subcategories at any level. See the picture below:

eg. I need a sql statement which, when I request the transfer id = 11, returns me (19,20,21,22,23,24,25,26)
source
share