I have a simple group by query:
SELECT timestamp, COUNT(users)
FROM my_table
GROUP BY users
How do I add a sum_each_day column that will sum the users count of each row and will aggregate it forward to the next row and so on
The output should be like this:
timestamp | users | sum_each_day
2015-11-27 1 1
2015-11-28 5 6
2015-11-29 3 9
2015-11-30 7 16
Thanks in advance
group byon a column that is being aggregated in theselectlist, while the column that is not aggregated is not listed in thegroup by. Neither is allowed in standardsql. Makes it hard to understand, and I wonder if it is intended.