→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
06-03-2021 10:04 PM
Solved! Go to Solution.
06-08-2021 12:51 PM
Select Top 1000000 Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption As [Operating System],
tsysAssetTypes.AssetTypename
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join (Select tblAssetUserRelations.Username,
tblAssetUserRelations.AssetID
From tblAssetUserRelations
Group By tblAssetUserRelations.Username,
tblAssetUserRelations.AssetID) Query1 On Query1.AssetID =
tblAssets.AssetID
Inner Join tblOperatingsystem On
tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join (Select tblAssetUserRelations.Username As UserName_Count,
Count(tblAssetUserRelations.AssetID) As Counter,
tblAssets.Assettype
From tblAssetUserRelations
Inner Join tblAssets On
tblAssets.AssetID = tblAssetUserRelations.AssetID
Where tblAssets.Assettype = -1
Group By tblAssetUserRelations.Username,
tblAssets.Assettype
Having Count(tblAssetUserRelations.AssetID) > 1) Counter On
Counter.UserName_Count = Query1.Username
Where tblAssetCustom.State = 1
Group By Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption,
tsysAssetTypes.AssetTypename,
Counter.Counter
06-04-2021 05:07 PM
06-04-2021 04:59 PM
Select Top 1000000 Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption As [Operating System]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join (Select tblAssetUserRelations.Username,
tblAssetUserRelations.AssetID
From tblAssetUserRelations
Group By tblAssetUserRelations.Username,
tblAssetUserRelations.AssetID) Query1 On Query1.AssetID =
tblAssets.AssetID
Inner Join tblOperatingsystem On
tblAssets.AssetID = tblOperatingsystem.AssetID
Inner Join (Select tblADusers.Username,
Count(tblADusers.ADUserID) As Count
From tblADusers
Group By tblADusers.Username
Having Count(tblADusers.ADUserID) > 1) Counter On tblAssets.Username =
Counter.Username
Where tblAssetCustom.State = 1
Group By Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption
06-04-2021 04:06 PM
06-04-2021 01:57 PM
Select Top 1000000 Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption As [Operating System]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join (Select tblAssetUserRelations.Username,
tblAssetUserRelations.AssetID
From tblAssetUserRelations) Query1 On Query1.AssetID = tblAssets.AssetID
Inner Join tblOperatingsystem On
tblAssets.AssetID = tblOperatingsystem.AssetID
Where tblAssetCustom.State = 1
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now