----> select cdr.cdr_recordId, cdr.cdr_dstName, cdr.cdr_dstCode, cdr.cdr_dstcompanyType, pcdr.cdr_dstName parent_cdr_dstName, pcdr.cdr_recordId parent_cdr_recordId, cdr.cdr_territoryId, case when dst.dstCompanyType = 'B' and dst.dstParentCo > 0 then dst.dstParentCo else dst.dstId end as parentDstId, ter.territoryPath from tbl_CDR_Distributors cdr with (nolock) inner join tbl_TER_Territories ter with (nolock) on ter.territoryId = cdr.cdr_territoryId and ter.ownerId = cdr.ownerId and ter.fsl_tablecode = cdr.fsl_tablecode left join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdr.fsl_dstId and dst.dstParentCo > 0 left outer join tbl_CDR_Distributors pcdr with (nolock) on pcdr.fsl_dstId = dst.dstParentCo and pcdr.ownerId = cdr.ownerId and pcdr.fsl_tablecode = cdr.fsl_tablecode where cdr.ownerId = and cdr.fsl_tablecode = and cdr.cdr_recordId = select dstparentCo from tbl_DST_Distributors dst with (nolock) inner join tbl_CDR_Distributors cdr with (nolock) on cdr.fsl_dstId = dst.dstId where cdr.cdr_recordId = select cdr2.cdr_recordId from tbl_CDR_Distributors cdr2 with (nolock) inner join tbl_CDR_Distributors cdr with (nolock) on cdr.fsl_dstid = cdr2.fsl_dstid and cdr.ownerId = cdr2.ownerId and cdr.fsl_tablecode = cdr2.fsl_tablecode and cdr.cdr_territoryId = cdr2.cdr_territoryId inner join tbl_CDR_Distributors rda with (nolock) on rda.cdr_recordId = cdr2.cdr_redistAcctFor and rda.cdr_dstcompanytype = 'R' and rda.ownerId = cdr2.ownerId and rda.fsl_tablecode = cdr2.fsl_tablecode where cdr2.cdr_dstcompanytype = 'S' and cdr.cdr_recordId = and cdr.ownerId = and cdr.fsl_tablecode = and cdr.fsl_dstId > 0 select territoryId from tbl_TER_Territories with (nolock) where ownerId = and fsl_tablecode = and name = select t.name as territoryName, t.internalSalesId as territoryCode, b.broker_name, b.broker_id, t.territoryId from tbl_TER_Territories t with (nolock) left outer join tbl_SMA_BrokerOfficeLink sma with (nolock) on sma.territoryId = t.territoryId and sma.mfr_id = t.ownerId and 'MFR' = t.fsl_tablecode and sma.primaryOffice = 'Y' left outer join tblBrokers b with (nolock) on b.broker_id = sma.brokerid where t.ownerId = and t.fsl_tablecode = and t.territoryId in () and b.broker_id = --->

---> SELECT cdr.cdr_recordId, cdr.cdr_dstName, cdr.cdr_dstCode, d.dstId, pcdr.cdr_recordId as parentRecordId FROM tbl_CDR_Distributors cdr with (nolock) INNER JOIN tbl_DST_Distributors d with (nolock) ON cdr.FSL_dstid = d.dstid and cdr.cdr_dstcompanyType = d.dstcompanyType inner JOIN tbl_DST_Distributors pd with (nolock) on pd.dstid = d.dstparentco inner join tbl_CDR_Distributors pcdr with (nolock) on pcdr.cdr_dstcompanyType = pd.dstcompanyType and pcdr.FSL_dstid = pd.dstid WHERE cdr.OwnerID = AND cdr.FSL_TableCode = AND d.dstCompanyType = 'B' and pd.dstcompanyType = 'P' and pcdr.cdr_recordId in () select distinct cdr.cdr_recordId, cdr.cdr_dstName, cdr.cdr_dstcompanytype from tbl_CDR_DstCodes cn with (nolock) inner join tbl_CDR_Distributors cdr with (nolock) on cdr.cdr_recordId = cn.cdr_recordId and cdr.ownerId = cn.ownerId and cdr.fsl_tablecode = cn.ownerType left outer join tbl_DST_Distributors dst with (nolock) on dst.dstId = cdr.fsl_dstId left outer join tbl_CDR_Distributors pcdr with (nolock) on pcdr.fsl_dstId = dst.dstParentCo and pcdr.ownerId = cdr.ownerId and pcdr.fsl_tablecode = cdr.fsl_tablecode where cn.ownerId = and cn.ownerType = and cn.cdr_dstcode like and cdr.cdr_dstCompanytype = #_css# #_headingHTML# #_css#
#_css#
#_css#
#_css#
#_css#

Growth Opportunities

#_css#
#_css#
#_css# #_headingHTML# #_css#
--->
#_css#

Claimed Sales Analysis

#_css#
#_css#
#_css#
#_css#

Growth Opportunities

#_css#
#_css#
#_css#