I am working with a table that hosts folders and contents (articles). I need to do a total counts of the contents under the main folders,
I have a root folder called MainRoot, and there are four sub-folders (sub1-4), some of the sub folders could also have some sub-folders.
I have two tables that holds the Folder Names and the Contents. Each folder row has a parent folder name under the folders name, so I can easily pull all the desired folders by matching the parent folder to be the MainRoot folder.
The content table has an associated folder id that can also be joined to the parent folder (one folder higher), but the challenge is when having more than 1 sub folders under the root folder.
I am looking for some direction or guidance on how tackle this.