How to delete duplicate catalog item draft

Obito
Tera Expert

Hi all,

 

I need to delete duplicate catalog item draft. I need to only keep last created. There is one question 'Jira ID'  where I am getting unique value from Jira, Based on that question's value I have do the glide aggregate count. If the count is greater than 1 (means there are more than 1 record where Jira Id is same) then I will only keep the latest one.  

How can I write this glide aggregate code?