SELECT left(convert (varchar, S.archiveddate,20),10) "Archived Date", EME.MbxDisplayName "Mailbox Name", PTG.DisplayName "Provisioning Group", COUNT(S.ItemSize) "No. Items Archived", SUM(S.ItemSize)/1024 "Archived Item Size (MB)", SUM(SP.OriginalSize)/1024/1024 "Original Item Size (MB)" FROM YOURVAULTSTORE.dbo.Saveset S, YOURVAULTSTORE.dbo.SavesetProperty SP, YOURVAULTSTORE.dbo.ArchivePoint AP, EnterpriseVaultDirectory.dbo.ExchangeMailboxEntry EME, EnterpriseVaultDirectory.dbo.PolicyTargetGroup PTG WHERE S.SavesetIdentity = SP.SavesetIdentity AND S.ArchivePointIdentity = AP.ArchivePointIdentity AND AP.ArchivePointID = EME.DefaultVaultId AND EME.PolicyTargetGroupEntryId = PTG.PolicyTargetGroupEntryId AND (PTG.DisplayName = 'Leavers PRovisioning Group Name') AND S.ArchivedDate > DATEADD(d, -5, getDate()) GROUP BY left(convert (varchar, archiveddate,20),10), EME.MbxDisplayName, PTG.DisplayName ORDER BY PTG.DisplayName, EME.MbxDisplayName