select i.partnerType, i.interactionDate, ip.purposeName, coalesce( ip.purposeId, 0 ) purposeId, opr.OPRType, i.disposition from tbl_CRM_interactions i with (nolock) left outer join tbl_CRM_InteractionPurposes ip with (nolock) on ip.purposeId = i.interactionPurposeId and ip.ownerId = i.ownerId and ip.ownerType = i.ownerType inner join tbl_OPR_ClientOperators opr with (nolock) on opr.operatorId = i.partnerId and opr.ownerId = i.ownerId and opr.fslTableCode = i.ownerType and i.ownerId = and i.ownerType = and i.participantId is null and i.dispositionUserId = and i.partnerType = 'OPR' and i.interactionDate >= select * from qmd_salesCallAll where disposition = '?' select * from qmd_salesCallAll where disposition <> '?' and interactionDate between and select * from qmd_salesCompleted where purposeName ='Prospecting' select * from qmd_salesCallStatus where purposeId > 0 and purposeName ='Prospecting' select * from qmd_prospectingCalls where interactionDate < select * from qmd_prospectingCalls where ( interactionDate >= ) select * from qmd_salesCompleted where purposeName ='Pipeline' select * from qmd_salesCompleted where purposeName ='Pipeline' and OPRType in ('C','D') ---> ---> select * from qmd_salesCallStatus where purposeId > 0 and purposeName ='Pipeline' select * from qmd_pipelineCalls where OPRType in ('A','B') select * from qmd_pipelineCalls where OPRType in ('C','D') ---> select * from qmd_pipelineCalls where interactionDate < select * from qmd_pipelineCalls where ( interactionDate >= ) select * from qmd_pipelineCallsCD where interactionDate < select * from qmd_pipelineCallsCD where ( interactionDate >= or interactionDate is null ) ---> select * from qmd_salesCompleted where purposeName ='Retention' and OPRType in ('A','B') select * from qmd_salesCompleted where purposeName ='Retention' and OPRType ='C' select * from qmd_salesCompleted where purposeName ='Retention' and OPRType ='D' select * from qmd_salesCallStatus where purposeId > 0 and purposeName ='Retention' select * from qmd_retentionCalls where OPRType in ('A','B') select * from qmd_retentionCalls where OPRType = 'C' select * from qmd_retentionCalls where OPRType = 'D' select * from qmd_retentionCallsAB where interactionDate < select * from qmd_retentionCallsAB where ( interactionDate >= ) select * from qmd_retentionCallsC where interactionDate < select * from qmd_retentionCallsD where interactionDate < select * from qmd_retentionCallsC where ( interactionDate >= ) select * from qmd_retentionCallsD where ( interactionDate >= ) select * from qmd_salesCallStatus where purposeId = 0 and partnerType = 'OPR' select * from qmd_operatorCalls where interactionDate < select * from qmd_operatorCalls where ( interactionDate >= or interactionDate is null ) select * from qmd_salesCallStatus where purposeId = 0 and partnerType = 'CDR' select * from qmd_distributorCalls where interactionDate < select * from qmd_distributorCalls where ( interactionDate >= or interactionDate is null ) --->
select purposeId from tbl_CRM_InteractionPurposes where purposeName='RETENTION' and ownerId = and ownerType =
Account Calls PND Past
Due
Avg # of calls/month
Prospecting Calls #lsnumberformat( qmd_prospectingCallsPending.recordCount )#0 #lsnumberformat( qmd_prospectingCallsPastDue.recordCount )#0 #NumberFormat(_prospectingAvg, "99.9" )#
Pipeline Calls #lsnumberformat( qmd_pipelineCallsPending.recordCount )#0 #lsnumberformat( qmd_pipelineCallsPastDue.recordCount )#0 #NumberFormat(_pipelineAvg, "99.9" )#
Retention Calls
A B Priority #lsnumberformat( qmd_retentionCallsPendingAB.recordCount )#0 #lsnumberformat( qmd_retentionCallsPastDueAB.recordCount )#0 #NumberFormat(_retentionABAvg, "99.9" )#
C Priority #lsnumberformat( qmd_retentionCallsPendingC.recordCount )#0 #lsnumberformat( qmd_retentionCallsPastDueC.recordCount )#0 #NumberFormat(_retentionCAvg, "99.9" )#
D Priority #lsnumberformat( qmd_retentionCallsPendingD.recordCount )#0 #lsnumberformat( qmd_retentionCallsPastDueD.recordCount )#0 #NumberFormat(_retentionDAvg, "99.9" )#