SELECT
  COALESCE(X.SalesProductCountBudget, 0) AS SalesProductCountBudget,
  COALESCE(X.CancellationProductCountBudget, 0) AS CancellationProductCountBudget
FROM (
  SELECT
    ( SELECT SUM(BU.Amount) FROM taBudget AS BU
      WHERE
        ((BU.Year * 100 + BU.Month) BETWEEN (YEAR(@aFromDate) * 100 + MONTH(@aFromDate)) AND (YEAR(@aToDate) * 100 + MONTH(@aToDate))) AND
        (BU.BudgetType = 'SalesProductCountGrowth')
        @pBranchID
        @pProductID
    ) AS SalesProductCountBudget,
    ( SELECT SUM(BU.Amount) FROM taBudget AS BU
      WHERE
        ((BU.Year * 100 + BU.Month) BETWEEN (YEAR(@aFromDate) * 100 + MONTH(@aFromDate)) AND (YEAR(@aToDate) * 100 + MONTH(@aToDate))) AND
        (BU.BudgetType = 'CancellationProductCountGrowth')
        @pBranchID
        @pProductID
    ) AS CancellationProductCountBudget
) AS X