Top 25 Remediations by Risk export to CSV - SQL query

I’m looking for a SQL query to create a Top 25 Remediations by Risk report in a CSV file format.

Appreciate your help.

The query linked to seems to be broken:

If you try and validate that in insightvm it returns get invalid query.

You have to go to the history in github and revert to the original commit to get a working query. The version updated on Jun 15 2023 with comment “Updated formatting of queries and corrected some text” looks broken.

Try it without the comments at the top. The comments don’t work for some reason. I just tested it and it validated. Thanks!