SQL query for Weekly reports

Is there any sample query to get top 20 riskiest assets name, IP address, owner?

I am trying to create a custom sql query and no luck with that

Data like asset IP/hostname and risk score are going to be in the dim_asset and fact_asset tables, so you can join those two and pull that info. For owner, are you referring to owner tags? In that case, you can also join with dim_tag and dim_tag_asset to get it.

A simpler option might be to use the query builder, either to create your own and generate a report that way, or using one of the built-in options. If you click Add and then Helpful Queries, there’s one for “Assets with Critical Vulnerabilities”, and you can filter those results to see those with the highest risk score.