SQL CTE query in Microsoft CRM reports