→ Celebrate SysAdmin Day 2024 with Lansweeper Enter our Giveaway here

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Martind
Engaged Sweeper II
Buenos dias

Quisiera saber con que reporte realizan el grafico de Chart: Computer Bios AgeDelete ? quiseira poder seleccionar las PC que estan tomando como base.

gracias
1 REPLY 1
RCorbeil
Honored Sweeper II
Select Top 1000000
DatePart(yyyy, tblBIOS.ReleaseDate) As Biosyear,
Count(tblAssets.AssetID) As Total
From
tblAssets
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Where
tblAssetCustom.State = 1
Group By
DatePart(yyyy, tblBIOS.ReleaseDate)
Order By
Biosyear

Select from all assets (tblAssets)
For all active assets (tblAssetCustom.State = 1)
Select the year from BIOS release date for each asset (tblBIOS.ReleaseDate)
Count the number of each year
Sort the results by year

tblBIOS is filled with data retrieved from Windows, so no non-Windows computers will have any BIOS data in there, nor will any other assets such as monitors and printers. By doing an INNER JOIN against tblBIOS, then, the results are automatically filtered for only Windows assets, so you don't need to explicitly filter for asset type "Windows".