Try this code, I think it will help to see only the current relation
Select Top 1000000 tblAssets.AssetID,
tblAssetCustom.Custom8 As [PM ID],
tblAssetCustom.Custom1 As ID,
tblAssetCustom.Custom2 As TAG,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tsysAssetTypes.AssetTypename,
tblAssetCustom.Custom3 As [HW Type],
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblState.Statename As State,
tsysAssetRelationTypes.RelationTypeIcon10 As Icon3,
tsysAssetRelationTypes.Name As RelationType,
Case
When tblAssetUserRelations.Userdomain Is Null Then ''
When tblADusers.Displayname Is Null Or
tblADusers.Displayname = '' Then tblAssetUserRelations.Userdomain + '\' +
tblAssetUserRelations.Username
Else tblADusers.Displayname
End As hyperlink_name_RelationUser,
tblAssetCustom.Custom4 As Holding,
Case
When tblAssetUserRelations.Userdomain Is Null Then ''
Else '/user.aspx?username=' + tblAssetUserRelations.Username +
'&userdomain=' + tblAssetUserRelations.Userdomain
End As hyperlink_RelationUser,
tblAssetCustom.Comments,
tblAssets.Description,
Case
When tblAssetUserRelations.EndDate < GetDate() Then '#dddddd'
Else '#ffffff'
End As backgroundcolor,
tblAssetUserRelations.StartDate As RelationStartDate,
tblAssets.Lastseen As [last successful scan],
tblAssetUserRelations.Comments As RelationComments,
tblAssetCustom.Custom5 As Floor,
tblAssetCustom.Custom6 As Office,
Coalesce(tsysOS.OSname, tblLinuxSystem.OSRelease, tblMacOSInfo.KernelVersion)
As OS,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Serialnumber,
tblAssets.Mac,
tblAssetCustom.BarCode As Barcode,
tblAssets.Firstseen As [Create at],
tblAssetCustom.PurchaseDate,
tblAssets.Processor As Processor,
tblAssets.Memory,
tblAssetCustom.Custom9 As [Licensed laptop],
tblAssetCustom.Custom17 As ABM,
tblAssetCustom.Custom14 As [Policy Сompliance],
tblADusers.email,
tblAssetCustom.Location,
tblAssetCustom.Custom12 As site,
tblAssetCustom.Custom13 As Supplier,
tblAssetCustom.Custom16 As [Price(EUR)],
tblAssetUserRelations.EndDate,
tblAssetCustom.Custom15,
tblAssetCustom.Custom18
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tblAssetUserRelations On
tblAssets.AssetID = tblAssetUserRelations.AssetID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Left Outer Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tsysAssetRelationTypes On tblAssetUserRelations.Type =
tsysAssetRelationTypes.RelationTypeID
Left Outer Join tblLinuxSystem On tblAssets.AssetID = tblLinuxSystem.AssetID
Left Outer Join tblMacOSInfo On tblAssets.AssetID = tblMacOSInfo.AssetID
Left Outer Join tblADusers On
tblADusers.Userdomain = tblAssetUserRelations.Userdomain And
tblADusers.Username = tblAssetUserRelations.Username
Where tblAssetUserRelations.EndDate Is Null
Order By tblAssetUserRelations.EndDate Desc,
RelationStartDate Desc,
tblAssets.AssetName,
tblAssets.Domain