Hi all
I'm hoping you lovely people can help me sort the following out, please
I have tens of thousands of rows of data which all repeat themselves (for boring reasons). There are 20+ columns but two are always a pair. I've used 'country' and 'value' here to demonstrate (see table below).
All I would like to do is add up the value for each unique (distinct) instance of the Country. The value is always the same for each instance of the country.
I've got a rough workaround with SUM(DISTINCT Value
) but some countries have the same value - so, with this solution, their individual values get lost and the total is not accurate.
All thoughts welcome.
Many thanks
Country | Value |
---|
UK | $786.25 |
UK | $786.25 |
UK | $786.25 |
UK | $786.25 |
UK | $786.25 |
UK | $786.25 |
UK | $786.25 |
USA | $253.32 |
USA | $253.32 |
USA | $253.32 |
Japan | $780.23 |
Germany | $23.20 |
Germany | $23.20 |
Germany | $23.20 |
Germany | $23.20 |
Germany | $23.20 |