title: sql - subtract values from different tables
body: <p>im new to sql. i tried to make simple subtraction of two columns from two tables.
  for example:</p>
  
  <pre><code>Table1 = id, amount, value
  
  Table2 = id, amount
  </code></pre>
  
  <p>how can i subtract amount 1 with amount 2 without adding total amount in each column. because i want to view it in row..
  this is what i have tried so far but still fail..</p>
  
  <pre><code>"SELECT ( SELECT amount FROM table1 ) - ( SELECT amount FROM table2 ) AS difference"
  </code></pre>
  
  <p>btw i want to ask, is there any way that sql can auto generate table or extra column to view the difference / result of subtraction?</p>
  
  <p>thank you</p>