I've been trying to look for a way to sum a specific set of values in a query.
Currently I have a query that returns all values needed, but I want it to now sum several values.
|Name|Value|
|x |1 |
|x |2 |
|x |3 |
|x |5 |
|y |3 |
|y |2 |
|y |2 |
|y |3 |
|z |3 |
|z |2 |
|z |1 |
I don't know if I should run a subquery, I'm not necessarily summing up distinct values, but instead have something along the lines of this:
|Name|Value|
|x |11 |
|y |10 |
|z |6 |
Although, each entry has their own unique ID for their respective row. I'm fairly new at this so I don't know if I would take that into account with my query.
select sum(Value) ... group by Name?