0

I have a 3-level Hierarchical Data

Dataset

I would like to have a break it out and have a table like this:

enter image description here

Could anyone please help me out?

Any help is highly appreciated.

Tran Tran
  • 39
  • 6
  • MySQL <> SQL Server. Conflicting platform tags have been removed. Please feel free to readd the tag for the platform you are using. – squillman Apr 08 '22 at 16:21
  • mysql 8 has recursive CTE, with prior versions this will be tricky – nbk Apr 08 '22 at 16:30

1 Answers1

-1

You are looking for a recursive-query in some sql framework unless you know the depth of the hierarchy. Here's a link to a MySQL example: How to create a MySQL hierarchical recursive query?

janst
  • 102
  • 10