There are over 1 million records in the file table and about 400,000 records in the dir table.
I need to do the following using an sql query i would really appreciate it if someone could
give me a possible solution.
I need a count of all files in the file table that belong to each directory in
the dir table. So for each directory in the dir table how many files have a path
beginning with the same path as the dir path (if the file
path name has the substring dir path name then the file is held in that dir)
I also need to get the sum of all the file sizes in each directory so this would
be the same as the first example but the sum of each file in the directory would need
to be tallyed.
So at the end of the query i would need, 2 seperate queries would be ok if needed.