‎03-18-2014 03:18 PM
Select Distinct Top 1000000 upgrade_tblCompCustom.Department As Department,
upgrade_tblSoftware.softwareName As Software,
Count(upgrade_tblSoftware.ComputerName) As Total
From upgrade_tblSoftware
Full Outer Join upgrade_tblCompCustom On (upgrade_tblSoftware.ComputerName =
upgrade_tblCompCustom.Computername)
Group By upgrade_tblCompCustom.Department,
upgrade_tblSoftware.softwareName
Having (upgrade_tblSoftware.softwareName = 'Microsoft Office 2000 Standard') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office 2000 Professional') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office XP Professional with FrontPage') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Professional Edition 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office 2000 SR-1 Professional') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Visio Professional 2003') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office Enterprise 2007') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Project Professional 2003') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office 2000 SR-1 Standard') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office 2000 Premium') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office 97, Professional Edition') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Professional Edition 2003') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office FrontPage 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Project Professional 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Visio Professional 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Visio Professional 2007') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office XP Professional') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office OneNote 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office XP Professional with FrontPage') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office Access 2003 Runtime')
Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Access Runtime (English) 2007') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office Accounting 2009') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office Enterprise 2007') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office OneNote 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Professional Edition 2003') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Project Professional 2007') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office Project Standard 2007')
Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Small Business Edition 2003') Or
(upgrade_tblSoftware.softwareName = 'Microsoft Office Standard 2007') Or
(upgrade_tblSoftware.softwareName =
'Microsoft Office Visio Professional 2007')
Order By Count(upgrade_tblSoftware.ComputerName) Desc,
Department
Solved! Go to Solution.
‎03-18-2014 06:36 PM
‎03-21-2014 05:56 PM
‎03-18-2014 08:11 PM
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=Computers, OU=Exchange Division, DC=amgdom, DC=com')
Or
(tblADComputers.OU = 'OU=Computers, OU=FTZ, DC=amgdom, DC=com' And
tblAssetCustom.State = 1)
Group By tblSoftwareUni.softwareName,
tblSoftwareUni.SoftwarePublisher,
tblSoftware.softwareVersion
Order By Total Desc
‎03-18-2014 06:36 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now