title: Suggested way to do a 'parallel period' SQL statement
body: <p>Let's say I want to get the profit between two dates. Then I can do something like this:</p>
  <pre><code>SELECT SUM(Profit)
  FROM Sales
  WHERE date BETWEEN '2014-01-01' AND '2014-02-01' AND &lt;other_filters&gt;
  </code></pre>
  <p>I would then like to compare it to a previous period offset by a fixed amount. It could be written something like this to get it in two rows:</p>
  <pre><code>SELECT SUM(Profit)
  FROM Sales
  WHERE date BETWEEN '2014-01-01' AND '2014-02-01' AND &lt;other_filters&gt;
  UNION ALL
  SELECT SUM(Profit)
  FROM Sales
  WHERE date BETWEEN '2014-01-01' - INTERVAL 1 YEAR AND '2014-02-01' - INTERVAL 1 YEAR AND &lt;other_filters&gt;
  </code></pre>
  <p>Is there a way to do this without a union? I am looking for something like this:</p>
  <pre><code>SELECT
      SELECT SUM(Profit),
      ???
  FROM Sales
  WHERE date BETWEEN '2014-01-01' AND '2014-02-01' AND &lt;other_filters&gt;
  </code></pre>
  <p>I think the tricky part here is how to 'un-do' the where filter for the offseted-time calculation.</p>