Athena(Presto)でSUM()やAVG()といった集計関数にOVERを付けてWindow集計を行う。 Window Functions — Presto 0.247 Documentation 次のテストデータを使う。 $ cat test-data.csv {"date":"2021-02-01","user":1,"value":10} {"date":"2021-02-01","user":2,"value":20} {"date":"2021-02-01","user":3,"value":30} {"date":"2021-02-01","user":1,"value":40} {"date":"2021-02-01","user":2,"value":50} {"date":"2021-02-01","user":3,"value":60} {"date":"2021