
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2021 10:04 PM
I've tried for several hours now to come up with a way to modify the reports I was able to find, but no such luck building something that ignores last users and only looks at assigned Owner. Ideally I would like to put together a report that shows something like this:
John Smith Laptop123 Windows 10
John Smith Laptop456 Windows 7
Mike Johnson Desktop123 Windows 7
Mike Johnson Desktop456 Windows 10
Mike Johnson Desktop789 Windows 10
Any guidance on how I can accomplish pulling a list of users with more than one Owned Windows device from an asset relationship perspective and list those unique devices in one clean list?
Solved! Go to Solution.
- Labels:
-
Report Center

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2021 12:51 PM
So I think I have spotted the issue , the counter was counting any number of devices so I have added a filter to only count Windows Devices, give this ago :
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
So this will show
UserName AssetName Operating System AssetTypename
Mr A Asset1 Windows 10 Windows
Mr A Asset2 Windows XP Windows
But will not show
UserName AssetName Operating System AssetTypename
Mr A Asset1 Windows 10 Windows
Mr A Mon1 NA Monitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2022 06:34 PM
Is there a report I can run to show multiple users logged into a single computer?
Example:
Computer Z has, users A & B logged in at the same time, due to the switch user function of windows (Fast User Switching).
So user A is not signed out, but rather locked the computer (Windows Key + L), then user B goes to the same computer Z and logs in via selecting the other user option at the lock screen.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-08-2021 12:51 PM
So I think I have spotted the issue , the counter was counting any number of devices so I have added a filter to only count Windows Devices, give this ago :
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
So this will show
UserName AssetName Operating System AssetTypename
Mr A Asset1 Windows 10 Windows
Mr A Asset2 Windows XP Windows
But will not show
UserName AssetName Operating System AssetTypename
Mr A Asset1 Windows 10 Windows
Mr A Mon1 NA Monitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2021 10:38 PM
Andy.S wrote:
Hi,
So I think I have spotted the issue , the counter was counting any number of devices so I have added a filter to only count Windows Devices, give this ago :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
So this will show
UserName AssetName Operating System AssetTypename
Mr A Asset1 Windows 10 Windows
Mr A Asset2 Windows XP Windows
But will not show
UserName AssetName Operating System AssetTypename
Mr A Asset1 Windows 10 Windows
Mr A Mon1 NA Monitor
I apologize for the late reply. I just tried this out and it looks to be working. Thank you so much for the help on this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2021 07:49 PM
I'm not the best person when it comes to working with SQL logic/syntax, but in my mind if I were to filter this the long way, I think it would go something like:
Display All Users and Assets they "Own" >
Ignore all Owned assets that are not Windows >
Display all users that are left that own more than 1 Windows asset, drop people with 1 or less off the report >
Done
I just can't get the logic to talk right.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2021 05:06 PM
Let me know exactly what you need as in filtering and i'll give it a go ?
Cheers
A

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2021 06:17 PM
Where tsysAssetTypes.AssetTypename not in ('Monitor','IOS') and tblState.Statename =
'Active'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2021 05:47 PM
Ok, this does get results, let me see if I can best describe what I'm seeing:
Username - AssetName - OS - Counter
User1 - PC1 - Windows10 - 2 (when I go to view this user, they do have 2 pieces of equipment assigned, but 1 is a PC and 1 is a docking station, so a non-windows item)
User2 - PC2 - Windows10 - 2
User2 - PC3 - Windows10 - 2 (this user has 2 entries in report, which is fine, and the counter of 2 is correct, but suspect if he had another piece of non-windows hardware assigned this count would be 3+ instead of 2)
and this trend continues. So it looks mostly right, its just not excluding non-windows type devices when assessing the number of owned devices.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2021 06:14 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 tblAssetUserRelations.Username As UserName_Count,
Count(tblAssetUserRelations.AssetID) As Counter
From tblAssetUserRelations
Group By tblAssetUserRelations.Username
Having Count(tblAssetUserRelations.AssetID) > 1) Counter On
Counter.UserName_Count = Query1.Username
Where tblAssets.Assettype = -1 And tblAssetCustom.State = 1
Group By Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption,
Counter.Counter,
tblAssets.Assettype

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2021 05:34 PM
Select Top 1000000 Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption As [Operating System],
Counter.Counter
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
From tblAssetUserRelations
Group By tblAssetUserRelations.Username
Having Count(tblAssetUserRelations.AssetID) > 1) Counter On
Counter.UserName_Count = Query1.Username
Where tblAssetCustom.State = 1
Group By Query1.Username,
tblAssets.AssetName,
tblOperatingsystem.Caption,
Counter.Counter
