I've been working with AWS Athena recently, and I needed to multiply the values of a particular column (all of which were positive). Seeing as SUM(column1)
is a readily available aggregate function in Presto (which is what the Athena query engine is built on top of), I was hoping I could find something similar that instead returned a product.
Unfortunately, as spelled out in this question, even SQL doesn't have such a thing. Which means... surprise surprise, neither does Presto! So, knowing there's no built in solution, how could we make a multiplicative aggregate operator?