Question : I’d like to do the following in one query using MySQL: grab a row that has a parent_id […]
Tag: tree
Implement a Parent-Level Count in Binary Search Tree
Question : Based on this question, have any way to implement a parent level count? Find highest level of a […]
PostgreSQL – retrieve all IDs in a tree for a given subnode
Question : I have a non-binary tree of customer, and I need to obtain all the IDs in a tree […]
For each category, find the count of foreign-key items in all child categories using a PostgreSQL Recursive CTE
Question : I have a typical tree structure stored as an adjacency list in PostgreSQL 9.4: gear_category ( id INTEGER […]
Sql, get category tree for values from one table, names and ids
Question : What I need I need select all ids or names from table “category” (all chidrens) until category_id is […]
Summarize from unlimited level depth parent-child in mysql
Question : I have 2 table master coa and coa transaction in MySQL like this, master : id | coa […]
Representing ownership of heirarchical tree structure
Question : In an application I’m developing, I have (among others) two structures: Users and Folders. CREATE TABLE users ( […]
Optimizing one-way syncing of large (wide) tree
Question : I deal with several trees that can vary in size (they all have depths of ~8-10) but it’s […]
Is it possible to expose the max depth of the B-Tree behind a rowstore index or a way to see how many nodes were traversed for a particular query?
Question : I’m personally interested in data structures and with knowing that rowstore indexes are stored with a B-Tree behind […]
“No Loop” Constraint for hierarchical data in postgresql
Question : I’ve got table like this in postgres: id primary key parent_id foreign key on id some data columns […]