Hello, I want to modify this report to add the folder count to this report. The report is currently rendering the the number of documents, the size, the number of versions, and size.
WITH n(DataID, DataSize, SubType) AS
(select DataID, DataSize, SubType from WebNodes where ParentID = %1
UNION ALL
SELECT nplus1.DataID, nplus1.DataSize, nplus1.SubType
FROM WebNodes as nplus1, n
Where n.DataID= nplus1.ParentID
)
select sum(NumDocs) as NumDocs,
round(sum(DocSize)*1.0/1024.0/1024.0,2) as "DocSize (MB)",
sum(NumVers) as NumVers,
round(sum(VerSize)*1.0/1024.0/1024.0,2) as "VerSize (MB)"
from (
SELECT count(n.DataID) as NumDocs,
sum(n.DataSize) as DocSize,
0 as NumVers,
0 as VerSize
FROM n
Where n.SubType = 144
Union All
Select 0 as NumDoc, 0 as DocSize,
Count(v.VersionID) as NumVers,
Sum(v.DataSize) as VerSize
From n left join DVersData v on n.DataID = v.DocID
where n.SubType = 144
) tmp