mfaisal.ce
Member
- Local time
- Tomorrow, 02:41
- Joined
- Dec 21, 2020
- Messages
- 76
Dear All,
I want to make a query but cant able to do that, plz help.....
I have 2 tables and i want to make a query to sum values...
Detail:
I want to make a query but cant able to do that, plz help.....
I have 2 tables and i want to make a query to sum values...
Detail:
| Sales Table | |
| SNO | BID |
| 1 | 222 |
| 2 | 555 |
| 3 | 333 |
| 4 | 222 |
| 5 | 333 |
| Payment Table | |||
| PID | SNO | Total | Paid |
| 1 | 1 | 1000 | 500 |
| 2 | 3 | 500 | 200 |
| 3 | 4 | 900 | 250 |
| 4 | 4 | 2000 | 0 |
| 5 | 5 | 3000 | 1000 |
| 6 | 3 | 2000 | 2000 |
| 7 | 3 | 100 | 100 |
| 8 | 5 | 500 | 50 |
| 9 | 5 | 1000 | 950 |
| 10 | 5 | 200 | 200 |
| 11 | 2 | 5000 | 5000 |
| Query Result | ||
| BID | Total | Paid |
| 222 | 3900 | 750 |
| 333 | 7300 | 4500 |
| 555 | 5000 | 5000 |