title: Merging two tables without using join in mysql?
body: <p>I have done an unsuccessful attempt to merge values from two different tables.The first one displays just as I would like but the 2nd one displays only the first row every time.</p>
  
  <pre><code>Select * From (Select date as Date, Sum(qty) as qtySum, Sum(weight) 
  as weightSum From stock_list Group by date) as A,
  (Select Sum(weight) as weightSum,Count(barcode)
  as barcodeCount From selected_items Group by date) as B Group by date;
  </code></pre>
  
  <p>This is the output that I get.</p>
  
  <p><a href="https://i.stack.imgur.com/t48mt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t48mt.png" alt="enter image description here"></a></p>
  
  <blockquote>
    <p>These is my selected_items table.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/5WHGt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5WHGt.png" alt="enter image description here"></a></p>
  
  <p>This is my stock_list.<a href="https://i.stack.imgur.com/gU6zR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gU6zR.png" alt="enter image description here"></a></p>
  
  <p>Both my queries work individually and I get the correct output only when I try to run them together it gives a problem for the 2nd query.Can anyone point out my mistake or show me a better way to do it.
  This is what my final objective is<a href="https://i.stack.imgur.com/t4bGd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t4bGd.png" alt="enter image description here"></a></p>