...
For storage size for projects, we just get all the files entities in these projects and follow all the way to filehandles to compute the total sizes.
Note1: Files that are not entities?
Code Block | ||
---|---|---|
| ||
# Sum file sizes for files in projects select n.PROJECT_ID, count(*) as c, sum(CONTENT_SIZE)/1024/1024/1024 as size_gb, sum(CONTENT_SIZE)/1024/1024/1024*0.03 as monthly_cost from JDONODE n join JDOREVISION r on r.OWNER_NODE_ID=n.ID join FILES f on f.ID = r.FILE_HANDLE_ID where n.PROJECT_ID in (1867134, 2759792, 2787333, 4921369) and n.NODE_TYPE = 'file' and f.METADATA_TYPE in ('S3') group by n.PROJECT_ID with rollup; |
...