| Name | Price | Discount |
| A | 10 | 2 |
| A | 20 | 5 |
| A | 55 | 3 |
| Total | 85 | 11 |
| B | 5 | 6 |
| B | 15 | 9 |
| B | 10 | 2 |
| Total | 30 | 17 |
The above table has separate total for each user. How to calculate it in sql server and return and different dataset or a combine dataset
| Name | Price | Discount |
| A | 10 | 2 |
| A | 20 | 5 |
| A | 55 | 3 |
| Total | 85 | 11 |
| B | 5 | 6 |
| B | 15 | 9 |
| B | 10 | 2 |
| Total | 30 | 17 |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khan Abrar AhmedPosted Sep 27, 2017, 7:02 AM
Tapan PatelPosted Sep 27, 2017, 10:47 AM
JohnPosted Sep 27, 2017, 8:02 AM
JohnPosted Sep 27, 2017, 6:54 AM
Khan Abrar AhmedPosted Sep 27, 2017, 6:49 AM
JohnPosted Sep 27, 2017, 6:47 AM
Khan Abrar AhmedPosted Sep 27, 2017, 6:39 AM