Questions tagged [amazon-presto]
Use for questions about how to use Amazon Presto SQL query engine on Amazon EMR.
2
questions with no upvoted or accepted answers
1
vote
1
answer
166
views
(Athena/Presto) Window function (lag) is not reading the previous lag row
I have two tables, credit_memos and credit_memo_items and want to show each event individually and will thus do a insert (doing union in this case which is logically the same).
I know the key for both ...
0
votes
1
answer
88
views
Rolling sum with a floor in Athena/Presto
In Athena, I want to calculate a rolling sum, over a window, that can't go below 0. For example, if summing up a column that has values (1, 2, -1, -2, -1, -2, 1, 2) I should get (1, 3, 2, 0, 0, 0, 1, ...