select territoryId from request.qmd_userTerritoryHierarchy where localMarket = 1 and territoryId in ( ) select targetVolume as tyBudget, actualVolume as tyActual, remainingBaselineVolume as lyActual, planVolumeImpact as tyImpact , ytdRunRateVol as ytdRunRate, remainingBudgetVol as remainingBudget, runRateNeededVol as runRateNeeded, weeklyGapVol as weeklyGap, potentialGapVol as potentialGap targetValue as tyBudget, actualValue as tyActual, remainingBaselineValue as lyActual, planValueImpact as tyImpact , ytdRunRateVal as ytdRunRate, remainingBudgetVal as remainingBudget, runRateNeededVal as runRateNeeded, weeklyGapVal as weeklyGap, potentialGapVal as potentialGap from qmd_hierarchyRollup where territoryId = select targetVolume as tyBudget, actualVolume as tyActual, remainingBaselineVolume as lyActual, planVolumeImpact as tyImpact , ytdRunRateVol as ytdRunRate, remainingBudgetVol as remainingBudget, runRateNeededVol as runRateNeeded, weeklyGapVol as weeklyGap, potentialGapVol as potentialGap targetValue as tyBudget, actualValue as tyActual, remainingBaselineValue as lyActual, planValueImpact as tyImpact , ytdRunRateVal as ytdRunRate, remainingBudgetVal as remainingBudget, runRateNeededVal as runRateNeeded, weeklyGapVal as weeklyGap, potentialGapVal as potentialGap from qmd_hierarchyRollup_detail where territoryId = and subjectId = select fiscalYearStartMonth startMonth, fiscalYearEndMonth endMonth from tblManufacturers where mfr_id = and 'MFR' = select stageId from qmd_rawStages where stageId in () ( statusCode = 'A' or statusCode = 'C' ) order by likelihoodPercent select sum( volumeImpactvalueImpact ) tyImpact, count(distinct opportunityId) opportunityCount from qmd_oprOpportunities select sum( volumeImpactvalueImpact ) tyImpact, count(distinct opportunityId) opportunityCount from qmd_cdrOpportunities
select * from qmd_rawStages where ( statuscode = 'I' or statusCode = 'A' or statusCode = 'C' ) order by likelihoodPercent
  #_numericHeading#
Pipeline A. O. P. YTD Actual YTD Run Rt. Rem. Plan Wkly Run Rt. Needed Wkly. Gap Projected Ann. Gap Opps. Proj. CY Ship. Adj. Ann. Gap
DistributorOperator #lsnumberFormat(qmd_salesLookup.tyBudget)# #lsnumberformat(qmd_salesLookup.tyActual)# #lsnumberformat(qmd_salesLookup.ytdRunRate)# #lsnumberformat(qmd_salesLookup.remainingBudget)# #lsnumberformat(qmd_salesLookup.runRateNeeded)# #lsnumberformat(qmd_salesLookup.weeklyGap)# #lsnumberformat(qmd_salesLookup.potentialGap)# #lsNumberformat( _opportunityCount )# #lsnumberformat(_planImpact)# #lsnumberformat(_planProjectedVar)# 0 0 n/a 0 n/a n/a n/a #lsNumberformat( _opportunityCount )# #lsnumberformat(_planImpact)# n/a
select territoryId from request.qmd_userTerritoryHierarchy where parentTerritoryId in ( )