The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Custom multi-argument aggregate functions
I have a custom aggregate metric that is computed based on two different columns. It can be computed in SQL, but it is moderately complex. Something similar to: 100 * SUM(CASE WHEN c1 IN (0,1,2) THEN 1 ELSE 0) / SUM(CASE WHEN c1 = 0 AND c2 = 1 THEN 1 ELSE 0) I would like to abstract this into a UDF so that we can tweak the formula periodically and not have to update every query separately. Is there a clean way to do this, given that UDAFs can only take a single argument?