title: Generating accurate subtotals on fanout joins
body: <p>My data model:</p>
  <p><a href="https://i.stack.imgur.com/XCHwS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XCHwS.png" alt="enter image description here" /></a></p>
  <p>The query:</p>
  <pre><code>SELECT
      ProductSummary.Product,
      ProductSummary.ID AS SummaryID,
      Transactions.DateOfSale,
      Summary.Revenue
  FROM
      ProductSummary JOIN
      Transactions ON (Transactions.ProductID = ProductSummary.ID)
  WHERE
      Transactions.DateOfSale &lt; '2014-01-10'
  </code></pre>
  <p>The data itself looks fine, however I also want to show a subtotal, and the subtotal of a table should be the amount displayed when that table is not joined.</p>
  <p>For example, for subtotaling Revenue the answer should always be what I would get from <code>SELECT SUM(Revenue) FROM Summary</code> (after applying any necessary filters). How to generate that?</p>