Hello, I receive a spreadsheet of vulnerabilities for systems within a csv file. I'm able to import them, but I'm attempting to extract the number of vulnerabilities remediated with the percentage of types of risks. I'm using the query below, which provides the values for the vulnerabilities that have been remediated in 30 to 90 days along with the number of vulnerabilities of the types discovered in the past year.
SELECT COUNT([Vulnerability Info].VulnPresentFor) AS [Remediated in 30 to 90 days], System.Risk
FROM [Vulnerability Info]
WHERE VulnPresentFor BETWEEN 30 AND 90
GROUP BY System.Risk
UNION
SELECT COUNT([Vulnerability Info].VulnPresentFor) AS [Total], System.Risk
FROM [Vulnerability Info]
WHERE VulnPresentFor <= 365
GROUP BY System.Risk;
Instead of having a table that looks like the following:
Remediated in 30 days Risk 5 Low 10 Medium 15 Medium 12 Critical 14 High 24 Critical 19 High
I'd like one that looks like this:
Remediated in 30 days Percentage Risk 5 0% Low 10 67% Medium 12 74% High 14 50% Critical
All the data is available in the top table to create the second table, but I can't figure out how to combine the information to generate the lower table. Can anyone please give me some direction? Thanks