→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎04-16-2018 05:24 PM
Solved! Go to Solution.
‎04-16-2018 06:08 PM
SELECT Top 1000000
Year(tblAssetCustom.PurchaseDate) AS PurchaseYear,
Count(*) AS NumberOfAssets
FROM
tblAssets
INNER JOIN tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
WHERE
tblAssetCustom.State = 1 -- Active
AND tblAssets.AssetType = -1 -- Windows
AND tblComputersystem.Domainrole < 2 -- workstation
GROUP BY
Year(tblAssetCustom.PurchaseDate)
‎04-16-2018 06:08 PM
SELECT Top 1000000
Year(tblAssetCustom.PurchaseDate) AS PurchaseYear,
Count(*) AS NumberOfAssets
FROM
tblAssets
INNER JOIN tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
INNER JOIN tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
WHERE
tblAssetCustom.State = 1 -- Active
AND tblAssets.AssetType = -1 -- Windows
AND tblComputersystem.Domainrole < 2 -- workstation
GROUP BY
Year(tblAssetCustom.PurchaseDate)
‎04-16-2018 06:33 PM
‎04-16-2018 05:53 PM
Where tblComputersystem.Domainrole < 2Domainrole property is the easiest way to only select Workstations or Servers.
‎04-16-2018 06:35 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now