title: SQL for hierarchical relationship
body: <p>I've a table where products are categorised based on hierarchical relationship like a tree structure. I'm having to select a category and all subcategories at any level. See the picture below:</p>
  
  <p><img src="https://i.stack.imgur.com/cobEY.png" alt="enter image description here"></p>
  
  <p>e.g. i want an sql statement that when i query passing the id=11, it returns me (19,20,21,22,23,24,25,26)</p>