‎03-28-2017 01:51 AM
Select Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
Count(tblSoftware.AssetID) As Total
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
Where tblAssetCustom.State = 1
Group By tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblSoftwareUni.SoftwarePublisher
Order By Total Desc
‎06-19-2018 11:43 PM
‎06-19-2018 11:33 PM
dsn7287 wrote:
Hello,
Firstly, my apologies; I believe I initially posted this request incorrectly in the "Reports" forum topic which is for complete/ finalized reports.
Ok as for my request, I am really hoping someone can help me with this please:
I would like to revise the existing Lansweeper report: "Software: All installed software" to limit the report to capture software applicable only to the following:
1. Computers that have been "Last Seen" within the last 4 months (~120 days).
2. Only computers running desktop versions of the O/S (Win 7 SP1, Win 8 and Win 10).
Below is the original report's code
Select Top 1000000 tblSoftwareUni.softwareName As Software,
tblSoftware.softwareVersion As Version,
tblSoftwareUni.SoftwarePublisher As Publisher,
Count(tblSoftware.AssetID) As Total
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
Where tblAssetCustom.State = 1
Group By tblSoftwareUni.softwareName,
tblSoftware.softwareVersion,
tblSoftwareUni.SoftwarePublisher
Order By Total Desc
I have tried to do this multiple times to edit this report but I keep getting the following error: "Column 'tblAssets.Lastseen' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.". I am sure I am doing something wrong given that my SQL knowledge is pretty limited.
Would someone be able to assist me please? Any help would be greatly appreciated.
Thanks
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now