SQL Query to Calculate Story Points Completed & Story Points Not Completed In a Sprint?

Brooke Miller September 23, 2019

What is the SQL query to calculate story points completed in a given sprint and story points not completed (and therefore carried over to the next sprint or moved to the backlog)? 

 

I'm using our Jira database (configured using standard Jira schema implementation) for a PowerBI dashboard in order to maintain historical data. Currently, Jira only allows you to see the Velocity Report for the last 7 sprints, which is a limitation for us.

 

We want to see velocity over time, but there's an issue with how we are currently pulling this. For example, if there's a story that is committed to in Sprint 14, but doesn't get completed, so therefore gets carried over and completed in Sprint 15, then the "Completed" story points in Sprint 14 gets updated to reflect that change in status even after the sprint has already been closed. Does anyone have recommendations on how to distinguish the story points completed only at the time the sprint gets closed? 

 

Thanks!!

1 answer

0 votes
Pablo Beltran
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.
September 25, 2019

There are two main implementations of the SQL language to read Jira data.

One is the native SQL implementation by your database vendor (Oracle, MySQL, PostgreSQL, MSSQL) that everybody is familiar with.

Other is the SQL+JQL Driver app which allows using SQL via the Atlassian's public Java API for Jira instead of native SQL. It supports the Atlassian's public Java API for Jira Software too.

Here is the documentation for the data model supporting Sprints. You can read all the sprints and join them with the rest of the tables to get what you are looking for,

The Driver also supports standard JDBC to connect remotely from third-party reporting and analytics tools.

(Disclaimer: I work at the company that develops this app).

EDIT: if you finally use the Driver it would be very much appreciated if you share your SQL+JQL query here to help other organizations to resolve the same problem.

Brooke Miller September 30, 2019

I'm not looking to use an alternative to native SQL. 

Vikas Tiwari November 5, 2021

Hi @Brooke Miller .i am also looking for the same query, can you pls provide some idea for the same

Vikas Tiwari November 5, 2021

What is the SQL query to calculate story points completed in a given sprint and story points not completed (and therefore carried over to the next sprint or moved to the backlog)? 

Suggest an answer

Log in or Sign up to answer