title: Subtract in Union
body: <p>I have this data, where I want to generate the last row &quot;on the fly&quot; from the first two:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Group</th>
  <th>1yr</th>
  <th>2yrs</th>
  <th>3yrs</th>
  <th>date</th>
  <th>code</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Port</td>
  <td>19</td>
  <td>-15</td>
  <td>88</td>
  <td>1/1/2020</td>
  <td>arp</td>
  </tr>
  <tr>
  <td>Bench</td>
  <td>10</td>
  <td>-13</td>
  <td>66</td>
  <td>1/1/2020</td>
  <td>arb</td>
  </tr>
  <tr>
  <td>Diff</td>
  <td>9</td>
  <td>2</td>
  <td>22</td>
  <td></td>
  <td></td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I am trying to subtract the <code>Port</code> &amp; <code>Bench</code> returns and have the difference on the new row. How can I do this?</p>
  <p>Here's my code so far:</p>
  <pre><code>Select 
  date
              Group,
              Code,
            1 yr returnp,
            2 yrs returnp,
            3yrs return
  From timetable
  union
   Select   
  date,
             Group,
             Code,
            1 yr returnb,
            2 yrs returnb,
            3yrs returnb
  From timetable
  </code></pre>