SQL example - most vulnerable site by risk score per asset
This example query shows the most vulnerable site by risk score per asset.
The output shows:
- # of assets
- Site Risk Score
- Risk per Asset
1SELECT ds.name AS site, assets, riskscore,23(CASE riskscore WHEN 0 THEN NULL ELSE riskscore END) / (CASE assets WHEN 0 THEN NULL ELSE assets END) AS "RiskPerAsset"45FROM fact_site67JOIN dim_site ds USING (site_id)89ORDER BY "RiskPerAsset" DESC
Did this page help you?