SQL Query - Remediation Timeframe

I am trying to create a SQL query that would show:

IP Address, Hostname, discovery date of vulnerability, time vulnerability was remediated. Basically looking for an average time a vulnerability is remediated on the assets

If you’re currently using the Data Warehouse, I believe you can use the table fact_asset_vulnerability_remediation_date to get the date of remediation, and fact_asset_vulnerability_finding_remediation for the vulnerability’s discovery date. The Data Warehouse schema is here.

If not, I don’t think there’s a way to retrieve the date/time of the vulnerability remediation. There is a table that provides info on the age of vulnerabilities. Here’s a query that pulls some of this info.

SELECT favf.vulnerability_id, favf.asset_id, da.ip_address, da.host_name, fava.first_discovered, fava.age_in_days
FROM fact_asset_vulnerability_finding favf
JOIN dim_asset da ON favf.asset_id = da.asset_id
JOIN dim_vulnerability dv ON favf.vulnerability_id = dv.vulnerability_id
JOIN fact_asset_vulnerability_age fava ON favf.vulnerability_id = fava.vulnerability_id