SQL Query Export - Unauthorized/Unlicensed Software's

I am starting from scratch in building out a SQL Query report that can display/report all unauthorized and unlicensed software’s installed across all assets in my organization. What example would a query that calls this look like? Would I need to call specifically the name of each unauthorized software that may be installed across all assets or is there a function for that built in already?
Any and all guidance is greatly appreciated!

It’s probably useful to define exactly what you mean by unauthorized/unlicensed. Is that a single concept or two separate things?

I’d guess “unauthorized” means “software which users are running, but which isn’t sanctioned by the IT department of the organization they belong to”, whereas “unlicensed” might mean “software which isn’t installed/running under the terms of a valid license granted by the software IP owner”.

iam searching for something similar in insightvm or insightidr.
I need to get all installed software products from our assets + all corresponding devicenames.
Can somebody help.

Best regards

I suggest starting here:

There’s two example here to either group it by the software itself or by the asset. Use this query with the combined documentation for the dimension and fact tables and you should be able to get what you need.