--01 Client Synopsis Client Balances.sql -- SE rewrite of BO Client Synopsis balances (FactClientSynopsis SumType='B') -- View: udv_transaction_detail_34 -- Note: Cash In/Out / ParentCompany snapshot semantics are not in SEViews. -- Funds on Deposit is the closest per-file balance proxy; rolled to corp. SELECT td.[Corp Code] AS CorpCode, MAX(td.[Org Name]) AS FormalName, NULL AS ParentCompany, -- NOT USED IN SE SUM(CAST(0.00 AS DECIMAL(18, 2))) AS CashIn, -- InOut — unable to find SUM(CAST(0.00 AS DECIMAL(18, 2))) AS CashOut, -- InOut — unable to find SUM(ISNULL(td.[Funds on Deposit], 0)) AS NetCash, -- approximate (Funds on Deposit) MAX(td.[Transaction Date]) AS AsOfDate -- snapshot AsOfDate — unable to find FROM se_reports.dbo.[udv_transaction_detail_34] td GROUP BY td.[Corp Code] ORDER BY td.[Corp Code];