Is it possible to do something similar to a running sum for json?
I have this table:
day id data
────────────┼───────┼───────────────────
2016-06-20 │ 1 │ {"key0": "value0"}
2016-06-21 │ 1 │ {"key1": "value1"}
2016-06-22 │ 1 │ {"key2": "value2"}
And I would like it to be this table:
day id data
────────────┼───────┼────────────────────────────────────────────────────
2016-06-20 │ 1 │ {"key0": "value0"}
2016-06-21 │ 1 │ {"key0": "value0", "key1": "value1"}
2016-06-22 │ 1 │ {"key0": "value0", "key1": "value1", "key2": "value2"}
I tried using a window function because the default behavior is similar to this for aggregate functions but I don't know how to properly do it for json.
Is anyone able to help?