how to create Stock Table form Sell Table & Purchase Table
Sell_Table
| Date | Bill No | Product Name | Unit | Qty | Rate | Total Amount |
| 25/11/2017 | 13 | Notebook | Pic | 100 | 10 | 1000 |
| 25/11/2017 | 12 | Keyboard | Pic | 10 | 300 | 3000 |
| 25/10/2017 | 11 | Mobile | Pic | 5 | 5000 | 25000 |
| 10/10/20 17 | 10 | Keyboard | Pic | 20 | 300 | 6000 |
| 5/8/2017 | 9 | Mobile | Pic | 10 | 500 | 5000 |
Purchase_Table
| Date | Product Name | Unit | Qty | Rate | Total Amount |
| 5/11/2017 | Notebook | Pic | 500 | 10 | 5000 |
| 25/10/2017 | Keyboard | Pic | 100 | 300 | 30000 |
| 25/10/2017 | Mobile | Pic | 10 | 5000 | 50000 |
| 10/10/2017 | Keyboard | Pic | 20 | 300 | 6000 |
| 5/8/2017 | Mobile | Pic | 100 | 500 | 50000 |
Stock_Table
| Month | Product Name | Unit | Opening_Balance | TotalSold | Closing_Balance |
| Nov. 2017 | Notebook | Pic | 500 | 100 | 400 |
| Nov. 2017 | Keyboard | Pic | 100 | 10 | 90 |
| Oct 2017 | Keyboard | Pic | 20+100=120 | 20 | 100 |
| Oct 2017 | Mobile | Pic | 90+10 = 100 | 5 | 95 |
| Aug 2017 | Mobile | Pic | 100 | 10 | 90 |


Dharmraj ThakurRank #577 · 4.2K reputationPosted Dec 13, 2017, 7:22 PM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 11, 2017, 11:01 PM EST
Jyoti JodhaRank #1,408 · 1.2K reputationPosted Dec 12, 2017, 1:01 AM EST
Jyoti JodhaRank #1,408 · 1.2K reputationPosted Dec 12, 2017, 6:39 PM EST
Altaf AnsariRank #1,045 · 1.8K reputationPosted Dec 12, 2017, 7:36 PM EST
Jyoti JodhaRank #1,408 · 1.2K reputationPosted Dec 12, 2017, 11:57 PM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 13, 2017, 5:34 AM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 13, 2017, 9:03 PM EST
Tapan PatelRank #614 · 3.9K reputationPosted Dec 14, 2017, 9:54 AM EST
Jyoti JodhaRank #1,408 · 1.2K reputationPosted Dec 18, 2017, 6:37 PM EST