title: SQL compare rows between groups and show the missing
body: <p>I have the following data from a SQL DB. There are 98 columns in total this is an extract of 4 to illustrate what I would like to to and in the final query I would expect to require 51 of them. There are 15 million rows to this table.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>+-----------------+-----------------+---------------------+------------------------------+
  |    RatePlan     | RatePlanCharge  | SubscriptionVersion | RatePlanChargePreDiscountMRR |
  +-----------------+-----------------+---------------------+------------------------------+
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 7                   | 90                           |
  |                 |                 |                     |                              |
  | Online Support  | Online Support  | 7                   | 0                            |
  |                 |                 |                     |                              |
  | Module Support  | Module Support  | 7                   | 0                            |
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 6                   | 90                           |
  |                 |                 |                     |                              |
  | Module Support  | Module Support  | 6                   | 0                            |
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 5                   | 90                           |
  |                 |                 |                     |                              |
  | Premium Support | Premium Support | 5                   | 40                           |
  |                 |                 |                     |                              |
  | Module Support  | Module Support  | 5                   | 0                            |
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 4                   | 90                           |
  |                 |                 |                     |                              |
  | Module Support  | Module Support  | 4                   | 0                            |
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 3                   | 90                           |
  |                 |                 |                     |                              |
  | Online Support  | Online Support  | 3                   | 0                            |
  |                 |                 |                     |                              |
  | Module Support  | Module Support  | 3                   | 0                            |
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 2                   | 90                           |
  |                 |                 |                     |                              |
  | Online Support  | Online Support  | 2                   | 0                            |
  |                 |                 |                     |                              |
  | Main Product    | Main Product    | 1                   | 85                           |
  |                 |                 |                     |                              |
  | Online Support  | Online Support  | 1                   | 0                            |
  +-----------------+-----------------+---------------------+------------------------------+</code></pre>
  </div>
  </div>
  </p>
  
  <p>This table shows each change to a subscription. We can see;</p>
  
  <ul>
  <li>At version 3 Module Support is added</li>
  <li>At version 4 Online Support is removed</li>
  <li>At version 5 Premium Support is added</li>
  <li>At version 6 Premium Support is removed</li>
  <li>At version 7 Online Support is added</li>
  </ul>
  
  <p>What I want to do is run a query that will return rows missing from the current version that were present in the previous version, as below.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>+-----------------+-----------------+---------------------+------------------------------+--------------------------------+
  |    RATEPLAN     | RATEPLANCHARGE  | SUBSCRIPTIONVERSION | RATEPLANCHARGEPREDISCOUNTMRR |  SUBSCRIPTIONVERSION_MISSINGFROM |
  +-----------------+-----------------+---------------------+------------------------------+--------------------------------+
  |                 |                 |                     |                              |                                |
  | Premium Support | Premium Support | 5                   | 40                           | 6                              |
  |                 |                 |                     |                              |                                |
  | Online Support  | Online Support  | 3                   | 0                            | 4                              |
  +-----------------+-----------------+---------------------+------------------------------+--------------------------------+</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is this possible?</p>