This document contains an SQL query that selects data from the CBSREC table in the AnalyticsStaging database. It selects over 1000 columns including call details, subscriber information, charging data, and account balances. It then defines a temporary table (#tempSIP) that aggregates call records by date, payment type, total revenue, and call duration for specific called numbers between dates.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
61 views5 pages
Sip Trafic
This document contains an SQL query that selects data from the CBSREC table in the AnalyticsStaging database. It selects over 1000 columns including call details, subscriber information, charging data, and account balances. It then defines a temporary table (#tempSIP) that aggregates call records by date, payment type, total revenue, and call duration for specific called numbers between dates.
select ppn_dt, count(*) as nbre, paytype, sum(chargeamount1)/100 as revenue,
sum(callduration) as duree--, SubCOSID, into ##tempSIP FROM [AnalyticsStaging].[dbo].[CBSREC] with (nolock) where ppn_dt between '20181101' and '20181130' and CalledPartyNumber in ('221201555', '201555') group by PPN_DT, [PayType]