Find how many plans use each type of repository

Still need help?

The Atlassian Community is here for you.

Ask the community

Scenario

To know how many plans use each type of repository, you can run this SQL query:

 

SELECT vl.plugin_key AS repository_type, COUNT(vl.plugin_key) AS plans_sum
  FROM plan_vcs_location AS pvl 
  JOIN vcs_location      AS vl ON pvl.vcs_location_id = vl.vcs_location_id 
  JOIN build             AS b  ON b.build_id = pvl.plan_id
  JOIN project           AS p  ON b.project_id = p.project_id
GROUP BY repository_type
ORDER BY total_of_plans DESC;

Sample Result

REPOSITORY_TYPEPLANS_SUM
com.atlassian.bamboo.plugin.system.repository:svn2
com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-git:git1
Last modified on Nov 29, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.