SQL example - asset groups

This example query will provide you with a list of all asset groups that an asset belongs to. Column values provided:

  • Asset ID
  • Asset IP Address
  • Asset Hostname
  • Asset Group Name
sql
1
SELECT distinct(daga.asset_id), da.ip_address, da.host_name, dag.name AS asset_group
2
FROM fact_asset_group fag
3
JOIN dim_asset_group dag USING (asset_group_id)
4
JOIN dim_asset_group_asset daga USING (asset_group_id)
5
JOIN dim_asset da USING (asset_id)
6
ORDER BY dag.name