Determining child count of path
- by sqlnewbie
I have a table whose 'path' column has values and I would like to update the table's 'child_count' column so that I get the following output.
path | child_count
--------+-------------
| 5
/a | 3
/a/a | 0
/a/b | 1
/a/b/c | 0
/b | 0
My present solution - which…