I have a table that looks like this. For certain dates, specific values are added (or removed) for label(s).
EntryDate Label Value
2017-05-01 A 10
2017-05-03 B 10
2017-05-05 A 10
2017-05-05 B 10
I need to get an output that shows me the cumulative sum of values for each day, irrespective of label. The result would look like:
EntryDate ValueSum
2017-05-01 10
2017-05-02 10
2017-05-03 20
2017-05-04 20
2017-05-05 40
This query lets me get the cumulative sum for a specific date. Can I run a single query to get the cum. sum for each date?
select EntryDate, sum(value) valueSum from Mytable group by Date
Also, if I'd like to get the sums for only those dates where values have been added/removed, how can I get that?
EntryDate ValueSum
2017-05-01 10
2017-05-03 20
2017-05-05 40
Thanks.