‎03-05-2019 12:59 PM
Select Top 1000000 'license.png' As Icon,
tblExchangeLicense.LicenseId,
tblExchangeLicense.LicenseName As DisplayName,
Case
When users.cnt Is Null Then 0
Else users.cnt
End As Users,
tblExchangeServer.AssetId As ServerAssetId,
tblExchangeServer.Name As ExchangeServer
From tblExchangeLicense
Inner Join tblExchangeServer On tblExchangeServer.ServerId =
tblExchangeLicense.ServerId
Left Outer Join (Select Count(tblExchangeUserLicense.UserId) As cnt,
tblExchangeUserLicense.LicenseId
From tblExchangeUserLicense
Group By tblExchangeUserLicense.LicenseId) users On users.LicenseId =
tblExchangeLicense.LicenseId
Where tblExchangeLicense.UnitLabel = 'CAL'
Order By DisplayName
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now