Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Current »

MySQL / PostgreSQL 

-- Find Attachment Statistic
SELECT p.pkey, p.pname, EXTRACT(YEAR FROM f.created) yr, COUNT(f.id) AS "# of files", MIN(f.filesize)/1024 AS "min size (kb)", AVG(f.filesize)/1024 AS "average size(kb)", MAX(f.filesize)/1024 AS "max size(kb)", SUM(f.filesize)/(1024*1024) AS "total size(mb)" FROM fileattachment f, project p, jiraissue i WHERE f.issueid = i.id AND i.project = p.id GROUP BY p.pkey, p.pname, yr;

Sample Result


  • No labels