---
title: "[Xray] How to get the List of projects that contain Xray data"
canonical: "https://docs.getxray.app/space/ProductKB/141688837/%5BXray%5D%20How%20to%20get%20the%20List%20of%20projects%20that%20contain%20Xray%20data"
format: markdown
---
Currently, Xray doesn't have a way to provide you with a list of projects with Xray data. This is sometimes useful for filtering, reindexing, or planning a migration.

With the below queries, you can help identify the projects!

For example, to fetch projects that contain all Xray Issue types:

```
select project.pkey as project_key,count as total from jiraissue join project on project.id=jiraissue.project join issuetype on jiraissue.issuetype=issuetype.id where issuetype.pname in ('Test','Pre-Condition','Test Set','Test Execution','Sub Test Execution','Test Plan') group by project.pkey;
```

It is important that you adapt the names of the Xray issues if they differ from those in the query.  
   
For the Xray Requirement projects, projects can be mapped as a requirement from -> +Settings+ -> +Apps+ -> +Xray+ -> {+}Requirement Projects{+}.  
   
To get the list:

```
SELECT * FROM PROPERTYENTRY pe
LEFT JOIN PROPERTYDATA data on data.id = pe.id
LEFT JOIN PROPERTYDATE date on date.id = pe.id
LEFT JOIN PROPERTYDECIMAL decimal on decimal.id = pe.id
LEFT JOIN PROPERTYNUMBER number on number.id = pe.id
LEFT JOIN PROPERTYSTRING string on string.id = pe.id
LEFT JOIN PROPERTYTEXT text on text.id = pe.id
WHERE property_key like '%requirement-coverage.projects%';
```

The value returned is an array with comma-separated project IDs, {+}where requirement coverage is enabled{+}.  


<span style="color: #ff5630">**Note: These queries may have to be adapted based on the database used.*</span>

## Related articles

> Macro (contentbylabel)