
[dbo].[arg_entitlement_summary_view]
CREATE VIEW dbo.arg_entitlement_summary_view
AS
SELECT a.own_resource_uuid, isnull(b.license_count, 0) license_count, isnull(c.entitlement_count, 0) entitlement_count, isnull(b.license_count, 0) - isnull(c.entitlement_count, 0) variance
FROM ca_owned_resource a left outer join ca_software_license b on a.license_uuid=b.license_uuid left outer join arg_entitlement_count_view as c on a.own_resource_uuid = c.object_uuid
GO
GRANT SELECT ON [dbo].[arg_entitlement_summary_view] TO [swcmadmin]
GO