I just did something similar to this, here is my report. In my scenario I didn't write it to include only specific software, I wanted to see everything installed on all the computers in the OU so I could manipulate it in Excel. In my case there were two OU's I needed to check for each department, 1 for desktops, 1 for laptops... This give you a large list and the total install count of every piece of software.
The main issue I have is I had to create 30 of these reports because I had to target every department's OU individually. It also returns different versions of the same software title as a separate row. I imagine those could be combined in the report but my SQL knowledge is limited. Instead I just clean it up in Excel.
Select Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftwareUni.SoftwarePublisher As Publisher,
Count(tblSoftware.AssetID) As Total,
tblSoftware.softwareVersion
From tblSoftware
Inner Join tblAssets On tblSoftware.AssetID = tblAssets.AssetID
Inner Join tblSoftwareUni On tblSoftware.softID = tblSoftwareUni.SoftID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblADComputers On tblAssets.AssetID = tblADComputers.AssetID
Where
(tblADComputers.OU =
'
OU=Laptops,INSERT YOUR OU HERE') Or
(tblADComputers.OU =
'
OU=Desktops,INSERT YOUR OU HERE' And
tblAssetCustom.State = 1)
Group By tblSoftwareUni.softwareName,
tblSoftwareUni.SoftwarePublisher,
tblSoftware.softwareVersion
Order By Total Desc