title: adding values of two columns in different databases sql
body: <p>I have two tables Product and Stock that sit on two different databases, dbA and dbB respectively. They contain QTY, Quantity columns respectively.</p>
  
  <pre><code>QTY  Quantity
  ---  -----
  50    30
  50    40 
  50    60
  50    50
  </code></pre>
  
  <p>I want to return the sum of all the values in these two columns. 50 + 50 + .. 40 + 60 + 50 = 380</p>
  
  <p>If I do this: <code>SELECT sum(QTY) FROM dbA.Product</code> I get 200  and <code>SELECT sum(Quantity) FROM dbB.Stock</code> gives me 180 but when I do something like this:</p>
  
  <p><code>SELECT sum(QTY) + sum(Quantity) FROM dbA.Product, dbB.Stock;</code> I don't get 380 but some other number which I have no idea how it arrives to it.</p>