The key here is that we have an explicit 'Reopen' state in the workflow and we can test for this. Not as a current state but how many times we move through the state. This is easily done as a custom Excel Report.
As Anthony Hilyard shows, it is essentially a join between the Bug table and the audit log/property table. To get the release, you also need to join with the Releases table. We use both the detected in release and the targeted release. The targeted release moves on to the current release for any open defect so we coalesce them together so if there is no target release, it uses the current release. Unlike Anthony's solution, we just want to count the reopens, rather than list them.
The SQL to look in Release, '@RelNam@' would look like this:
SELECT
BG.BG_BUG_ID As 'Defect ID',
BG.BG_STATUS As 'Status',
COUNT(AU.AU_ACTION_ID) As 'Reopens',
BG.BG_DETECTED_BY AS 'Detected By',
BG.BG_SUMMARY As 'Summary'
FROM BUG BG
LEFT JOIN AUDIT_LOG AU ON BG.BG_BUG_ID = AU.AU_ENTITY_ID
INNER JOIN AUDIT_PROPERTIES AP ON AU.AU_ACTION_ID = AP.AP_ACTION_ID
INNER JOIN RELEASES RLS ON RLS.REL_ID = COALESCE(BG.BG_TARGET_REL,BG.BG_DETECTED_IN_REL)
WHERE 1=1
AND RLS.REL_NAME = '@RelNam@'
AND (AU.AU_ENTITY_TYPE = 'BUG' OR AU.AU_ENTITY_TYPE IS NULL)
AND AU.AU_ACTION = 'UPDATE'
AND (AP.AP_PROPERTY_NAME = 'Status' AND AP.AP_NEW_VALUE = 'Reopen')
GROUP BY
BG.BG_BUG_ID,
BG.BG_STATUS,
BG.BG_DETECTED_BY,
BG.BG_SUMMARY
ORDER BY BG.BG_BUG_ID
If you want to use date instead, drop the join with releases and the associated WHERE clause and just use a test for BG_DETECTION_DATE instead.
If you don't have an explicit 'Reopen' state but your workflow has a 'Retest' and 'Fix', you can instead look for the number of transition events involving old state=Retest and new state='Fix'. This will exclude first time through, only where a defect is reopened.
Remember if you want to add columns in the output, make sure they are also in the 'Group By' clause at the bottom.