I have a very basic table within an MS SQL DB.
| Product | Amount | Storage Unit |
| ------------ | ------------ | ------------ |
| 1 | 34 | A |
| 1 | 10 | A |
| 2 | 20 | B |
| 2 | 30 | C |
| 3 | 10 | D |
Essentially, I would like a view that ignores the location of the products, but just aggregates the total Amount
for each product.
So in this instance, I'd end up with the below. What is the best way to achieve this? A view? I'm very new to SQL and muddling through at the moment!
1条答案
按热度按时间6yt4nkrj1#
Thanks to CharlieFace in the comments;