‎10-31-2020 12:43 AM
Solved! Go to Solution.
‎11-02-2020 05:48 PM
Convert(Decimal(5,2), ( Sum(tblWinSAT.WinSPRLevel) +
Sum(tblWinSAT.CPUScore) +
Sum(tblWinSAT.MemoryScore) +
Sum(tblWinSAT.GraphicsScore) +
Sum(tblWinSAT.D3DScore) +
Sum(tblWinSAT.DiskScore)
) / 6
) AS [Average score]
‎11-06-2020 05:17 PM
Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.IPAddress,
tblWinSAT.WinSPRLevel As [Base score],
tblWinSAT.CPUScore As Processor,
tblWinSAT.MemoryScore As [Memory (RAM)],
tblWinSAT.GraphicsScore As Graphics,
tblWinSAT.D3DScore As [Gaming graphics],
tblWinSAT.DiskScore As [Primary hard disk],
Convert(Decimal(5,2), ( tblWinSAT.WinSPRLevel +
tblWinSAT.CPUScore +
tblWinSAT.MemoryScore +
tblWinSAT.GraphicsScore +
tblWinSAT.D3DScore +
tblWinSAT.DiskScore
) / 6
) AS [Average score]
From
tblWinSAT
Inner Join tblAssets On tblAssets.AssetID = tblWinSAT.AssetId
Inner Join tblADusers On tblAssets.Username = tblADusers.Username And tblADusers.Userdomain = tblAssets.Userdomain
Where
tblAssets.AssetID Is Not Null
And Len(RTrim(LTrim(tblAssets.AssetID))) > 0
‎11-06-2020 06:34 PM
RC62N wrote:
I hadn't looked at tblWinSAT before but I just did. You don't need to do the SUM()s that you have in your query.Select Top 1000000
tblAssets.AssetID,
tblAssets.AssetUnique,
tblAssets.IPAddress,
tblWinSAT.WinSPRLevel As [Base score],
tblWinSAT.CPUScore As Processor,
tblWinSAT.MemoryScore As [Memory (RAM)],
tblWinSAT.GraphicsScore As Graphics,
tblWinSAT.D3DScore As [Gaming graphics],
tblWinSAT.DiskScore As [Primary hard disk],
Convert(Decimal(5,2), ( tblWinSAT.WinSPRLevel +
tblWinSAT.CPUScore +
tblWinSAT.MemoryScore +
tblWinSAT.GraphicsScore +
tblWinSAT.D3DScore +
tblWinSAT.DiskScore
) / 6
) AS [Average score]
From
tblWinSAT
Inner Join tblAssets On tblAssets.AssetID = tblWinSAT.AssetId
Inner Join tblADusers On tblAssets.Username = tblADusers.Username And tblADusers.Userdomain = tblAssets.Userdomain
Where
tblAssets.AssetID Is Not Null
And Len(RTrim(LTrim(tblAssets.AssetID))) > 0
‎11-02-2020 07:09 PM
‎11-02-2020 05:48 PM
Convert(Decimal(5,2), ( Sum(tblWinSAT.WinSPRLevel) +
Sum(tblWinSAT.CPUScore) +
Sum(tblWinSAT.MemoryScore) +
Sum(tblWinSAT.GraphicsScore) +
Sum(tblWinSAT.D3DScore) +
Sum(tblWinSAT.DiskScore)
) / 6
) AS [Average score]
‎11-02-2020 04:19 PM
Select Top 1000000
Convert(Decimal(5,2), Avg(tblWinSAT.WinSPRLevel)) As [Base score],
Convert(Decimal(5,2), Avg(tblWinSAT.CPUScore)) As Processor,
Convert(Decimal(5,2), Avg(tblWinSAT.MemoryScore)) As [Memory (RAM)],
Convert(Decimal(5,2), Avg(tblWinSAT.GraphicsScore)) As Graphics,
Convert(Decimal(5,2), Avg(tblWinSAT.D3DScore)) As [Gaming graphics],
Convert(Decimal(5,2), Avg(tblWinSAT.DiskScore)) As [Primary hard disk]
From
tblWinSAT
Inner Join tblAssets On tblAssets.AssetID = tblWinSAT.AssetId
Inner Join tblADusers On tblAssets.Username = tblADusers.Username And tblADusers.Userdomain = tblAssets.Userdomain
Where
tblAssets.AssetID Is Not Null And Len(RTrim(LTrim(tblAssets.AssetID))) > 0
‎11-02-2020 05:21 PM
RC62N wrote:Select Top 1000000
Convert(Decimal(5,2), Avg(tblWinSAT.WinSPRLevel)) As [Base score],
Convert(Decimal(5,2), Avg(tblWinSAT.CPUScore)) As Processor,
Convert(Decimal(5,2), Avg(tblWinSAT.MemoryScore)) As [Memory (RAM)],
Convert(Decimal(5,2), Avg(tblWinSAT.GraphicsScore)) As Graphics,
Convert(Decimal(5,2), Avg(tblWinSAT.D3DScore)) As [Gaming graphics],
Convert(Decimal(5,2), Avg(tblWinSAT.DiskScore)) As [Primary hard disk]
From
tblWinSAT
Inner Join tblAssets On tblAssets.AssetID = tblWinSAT.AssetId
Inner Join tblADusers On tblAssets.Username = tblADusers.Username And tblADusers.Userdomain = tblAssets.Userdomain
Where
tblAssets.AssetID Is Not Null And Len(RTrim(LTrim(tblAssets.AssetID))) > 0
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now