Skip to content
Advertisement

Tag: hierarchical-data

temporal joins in hierarchical query

I want to join various nodes of a tree, making sure the the returned root-to-leaf path is temporally valid. The tricky part is that the data source is dated with validity from-to dates. ID NVALUE VFROM VTO 1 A 2021-01-01 2021-01-31 1 B 2021-02-01 2021-02-28 2 C 2021-01-01 2021-02-28 3 D 2021-01-01 2021-01-31 3 E 2021-02-01 2021-02-28 the links are

MySQL – Recursively list all parents and ancestors of all items in table

I have a table with a parent/child hierarchy that supports multiple (theoretically infinite) levels of nesting: I am trying to build a query that produces a concatenated list of every item’s parent items up until the highest parent in the tree: Based on a number of other answers here I have constructed the following MySQL query: See Fiddle here: http://sqlfiddle.com/#!9/48d276f/902/0

Sql Database design hierarchy

I have been tasked to create an app to track our contracts. I am planing to use Django and PostgreSQL. Our existing data is in Excel with 52 rows. I have found an hierarchy pattern in the file which contains as below Holding Office Registered Office Operating Office For example – Holding office (company) can contain one more Registered Office

Oracle SQL/PLSQL: Hierarchical recursive query

I have asked very similar questions before but still haven’t achieved the correct result… third times the charm but I now have a stable parent-child relationship to work with. Every row in the multi-level data set has a cost. For a specific row I need to find the lowest level and roll-up the cost. Then my users will compare the

Advertisement