0

Q: we use this query in merge stored procedure. we need to improvise this query to retrieve data faster
WITH TotalSeats
AS ( SELECT T.PMGTenantID ,
O.ProductName,
COUNT(DISTINCT S.SubscriptionId) 'TotalSubscriptions' ,
COALESCE(O.HasExchange, 0) 'HasExchange' ,
COALESCE(O.HasSharePoint, 0) 'HasSh...