SQL Query to list out the assets with the vulnerabilities which has exploits, along with the asset type (Server or Workstation)

Hi,

I need a sql query to list out the assets which has critical vulnerabilities with exploits found in the last 30 days along with the asset type (server or workstation) based on the cvss v3 score and risk score.