title: MySQL Join Two Tables and Sum from both Table
body: <p>I have two table &amp; Need sum of column from both table, i try but cant get result</p>
  <p>table-1 Delivery:<a href="https://i.stack.imgur.com/Zv4l0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zv4l0.png" alt="" /></a></p>
  <p>Table- Collection:
  <a href="https://i.stack.imgur.com/QWFhb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QWFhb.png" alt="enter image description here" /></a></p>
  <p>My inner join query was:</p>
  <pre><code>SELECT loan_collection.coll_date,
         sum(loan_collection.coloan_amo) AS coloan_amo,
         sum(loan_collection.sc_coll) AS sc_coll,
         sum(loan_collection.total_coll) AS total_coll,
         loan_collection.year,
         bag_del_rentcoll.rent_bagdel,
         bag_del_rentcoll.rent_amo,
         bag_del_rentcoll.booking,
         bag_del_rentcoll.rent_rece
  FROM loan_collection AS loan_collection
  INNER JOIN
    (SELECT del_date,
            sum(rent_bagdel) AS rent_bagdel,
            sum(rent_amo) AS rent_amo,
            sum(booking) AS booking,
            sum(rent_rece) AS rent_rece
     FROM bag_del_rentcoll) AS bag_del_rentcoll
  GROUP BY loan_collection.coll_date
  </code></pre>
  <p>The result is:
  <a href="https://i.stack.imgur.com/5hX08.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5hX08.png" alt="enter image description here" /></a>
  as you can see it's sum of all from table two. How can i get result as</p>
  <p><a href="https://i.stack.imgur.com/wg8kl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wg8kl.png" alt="enter image description here" /></a></p>
  <p>Thanks.</p>