SQL query to get biggest attachments from Jira?

Sorin Sbarnea (Citrix)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2012

I am looking for a SQL query that would retrun me the first biggest attachments from a Jira instance.

It would be perfect to work on PostgreSQL but I can fix it myself even if it's for another SQL backend.

1 answer

1 accepted

3 votes
Answer accepted
Norman Abramovitz
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2012
select filesize, jiraissue.pkey from fileattachment, jiraissue WHERE
fileattachment.issueid = jiraissue.id
order by filesize desc limit 20;

Mike Rathwell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 7, 2018

Is there an update to this for a newer version of Jira? This returns the list of giant files i've but BUT the "pkey" column is empty. Any thoughts?

Suggest an answer

Log in or Sign up to answer