The query is from the below site but re-written to work in SWQL Studio or a custom query
Run a report about licensed component monitors in SAM (solarwinds.com)
Hope its useful, I also adjust the case part and just show the column data as I want to found out the actual total not that its 50 for AppInsight, etc.
replace -
CASE WHEN r.Template = 'Windows Scheduled Tasks' THEN 5 WHEN r.Template LIKE 'AppInsight for IIS' THEN 30 WHEN r.Template LIKE 'AppInsight for%' THEN 50 ELSE COUNT(r.[ComponentID])
with this -
COUNT(r.[ComponentID]) AS [Licenses Used]
Top Comments
The query mentioned is a SQL query.
If you follow these instructions but choose SQL instead of SWQL your report will work.
thwack.solarwinds.com/.../how-to-create-a-report-from-a-swql-query