SQL querry help (system rev)

we have a similar issue as this thread https://forum.solidworks.com/message/185296#185296.

Ideally, I woud want to edit the sample querry in that comes with the EPDM install "File details of all files in a project" in 2 ways;

1) make it recursively go through sub-folders.

2) have it list the system rev, along with a couple of variables for each file

if it can't be recursive, then I would look at the "DocumentData of selected files" querry and get it to show the system rev and other variables.

I have attached a crp with just those 2 querries for reference, but I have zero experience in SQL, so any and all help would be much appreciated.

thanks,

edit - I noticed that I had attached the crp before saving it - now irt only has the 2 querries I am interested in.

SolidworksSolidworks Pdm enterprise Pdm