Select Top 1000000 tblAssets.AssetID, tblAssets.AssetName, tsysAssetTypes.AssetTypeIcon10 As icon, tblAssets.IPAddress, tsysIPLocations.IPLocation, tblAzureVirtualMachine.PowerState, tblAzureVirtualMachine.OsType As [OS Type], tblAzureVirtualMachine.Region, tblAzureVirtualMachine.Tags, tblAzureResourceGroup.Name As ResourceGroupName, tblAzureResourceGroup.SubscriptionId, tblAssets.Lastseen From tblAssets Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID Inner Join tblState On tblState.State = tblAssetCustom.State Inner Join tblAzureVirtualMachine On tblAzureVirtualMachine.AssetId = tblAssets.AssetID Inner Join tblAzureResourceGroup On tblAzureResourceGroup.Id = tblAzureVirtualMachine.AzureResourceGroupId Left Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID Where tblAssets.AssetName Not Like '%AZCTXWIN%' And tblAssets.Lastseen > GetDate() - 120 Order By tblAssets.AssetName