# Request: Remediated Instances - Data warehouse

**URL:** <https://discuss.rapid7.com/t/request-remediated-instances-data-warehouse/45748>\
**Category:** SQL Queries\
**Tags:** sql\
**Created:** [December 7, 2024, 4:30am UTC](https://discuss.rapid7.com/t/request-remediated-instances-data-warehouse/45748 "2024-12-07T04:30:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cgrimsmo](https://discuss.rapid7.com/letter_avatar_proxy/v4/letter/c/f19dbf/32.png) [@cgrimsmo](https://discuss.rapid7.com/u/cgrimsmo)\
**Post date:** [December 7, 2024, 4:30am UTC](https://discuss.rapid7.com/t/request-remediated-instances-data-warehouse/45748/1 "2024-12-07T04:30:32Z")

</div>

Hello, Does anyone have a good workaround to track remediated _instances_? I have a SQL query based on fact\_asset\_vulnerability\_instance and using a hash generation (MD5) to generate a unique ID for each instance.

```auto
    LOWER(
        MD5(
            da.asset_id || ':' ||
            CAST(COALESCE(favi.port, 0) AS text) || ':' || 
            COALESCE(vrefs.cve_reference, '') || ':' ||
            COALESCE(favi.key, '') || ':' ||
            htmlToText(favi.proof)
        )
    ) AS unique_id,

```

The problem I am running into is the lack of relationships in the fact\_asset\_vulnerability\_remediation\_date table. a record will only show up if all instances have been remediated and even then, only as 1 record regardless of # of instances.

Currently I am using a delta report in excel with a match formula to check old report with new report, but it is slow and tedious.  
My initial idea is exploring the possibility of creating my own snapshot table based on my existing query, automatically update it weekly (report cadence), append any new findings and mark missing as “Closed”.

Would love to hear if anyone has done something similar, before I jump down that rabbit hole 🙂

---

<div class="post-metadata">

**Author:** ![bradpjaxx](https://discuss.rapid7.com/user_avatar/discuss.rapid7.com/bradpjaxx/32/2411_2.png) [@bradpjaxx](https://discuss.rapid7.com/u/bradpjaxx)\
**Post date:** [April 8, 2025, 6:07pm UTC](https://discuss.rapid7.com/t/request-remediated-instances-data-warehouse/45748/2 "2025-04-08T18:07:42Z")

</div>

You’re correct that:

fact\_asset\_vulnerability\_instance shows current (active) instances.

fact\_asset\_vulnerability\_remediation\_date shows vulns remediated across all assets, and only once per vuln — you lose that granularity at the asset or instance level.

Unforunately There is no built-in per-instance remediation tracking that i am aware of unless you track deltas yourself. For that you would need weekly snapshots of favi-based results, each instance with a unique\_id, and status changes tracked over time.

i think at this point if thats what you need you would have to formulate a basic table structure and write up a stored procedure with python or powershell etc and do it that way would be my guess or what i would do probally,.
