select COUNT( distinct i.interactionId ) salesCalls, COUNT( distinct i.interactionId ) / #attributes.workingDays#.0 callsPerDay from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType where i.DispositionUserId = and i.Disposition <> '?' and i.interactionDate >= and i.interactionDate <= and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR' ) and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType = select COUNT( distinct i.interactionId ) salesCalls from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType where i.DispositionUserId = and i.Disposition <> '?' and i.interactionDate >= and i.interactionDate <= and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR' ) and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType = select COUNT( distinct i.interactionId ) salesCalls from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType where i.DispositionUserId = and i.Disposition <> '?' and i.interactionDate >= and i.interactionDate <= and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR' ) and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType = select COUNT(*) itemPresentations, SUM( case when isd.disposition in ( 'STD', 'LTO' ) then 1 else 0 end ) itemPlacements, sum( case when isd.disposition in ( 'STD', 'LTO') then annualCaseAmt else 0 end ) annualCasesSold, sum( case when isd.disposition in ( 'STD', 'LTO') then annualWeightAmt else 0 end ) annualPoundsSold, sum( case when isd.disposition in ( 'STD', 'LTO') then annualDollarAmt else 0 end ) annualDollarsSold from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType where i.DispositionUserId = and i.Disposition <> '?' and i.interactionDate >= and i.interactionDate <= and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR' ) and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType = select sum( case when isd.disposition in ( 'STD', 'LTO') then annualCaseAmt else 0 end ) annualCasesSoldYTD, sum( case when isd.disposition in ( 'STD', 'LTO') then annualCaseAmt else 0 end * (coalesce(prd.commissionrate,0) * coalesce(prd.averageUnitPrice,0)) ) annualEstCommSoldYTD from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType inner join tbl_PRD_SKUs sku with (nolock) on sku.skuid = isd.salesubjectid and sku.ownerID = isd.ownerID and sku.fsl_tablecode = isd.ownerType left outer join tbl_PRD_Products prd with (nolock) on prd.ProdID = sku.prodid and prd.ownerID = sku.ownerId and prd.fsl_tablecode = sku.fsl_tablecode where i.DispositionUserId = and i.Disposition <> '?' and i.interactionDate >= and i.interactionDate <= and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR' ) and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType = select sum( case when isd.disposition in ( 'STD', 'LTO') then annualCaseAmt else 0 end ) annualCasesSoldHTD from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType inner join tbl_PRD_SKUs sku with (nolock) on sku.skuid = isd.salesubjectid and sku.ownerID = isd.ownerID and sku.fsl_tablecode = isd.ownerType left outer join tbl_PRD_Products prd with (nolock) on prd.ProdID = sku.prodid and prd.ownerID = sku.ownerId and prd.fsl_tablecode = sku.fsl_tablecode where i.DispositionUserId = and i.Disposition <> '?' and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR' ) and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType = and isd.typeCode <> 'PRO' and isd.AvailableDate >= and isd.AvailableDate <= and i.interactionDate >= and i.interactionDate <= select COUNT( distinct i.interactionId ) salesCallSales from tbl_CRM_Interactions i with (nolock) inner join tbl_CRM_InteractionSaleDetails isd with (nolock) on isd.InteractionID = i.interactionId and isd.ownerId = i.ownerId and isd.ownerType = i.ownerType where i.DispositionUserId = and i.Disposition = 'S' and i.interactionDate >= and i.interactionDate <= and ( isd.saleSubjectType = 'SKU' or isd.saleSubjectType = 'MFR') and coalesce( isd.sourceType, '' ) <> 'SPL' and i.ownerId = and i.ownerType =