3 ms·
In Presto, we support the popular but non-standard IF construct as a shorthand for CASE, so you can do this: sum(if(bar, foo)) We also have a count_if() functi
by electrum 12y ago
In Presto, we support the popular but non-standard IF construct as a shorthand for CASE, so you can do this: sum(if(bar, foo))
We also have a count_if() function: count_if(bar)
http://prestodb.io/docs/current/functions/conditional.html#if http://prestodb.io/docs/current/functions/conditional.html#i...
http://prestodb.io/docs/current/functions/aggregate.html#count_if http://prestodb.io/docs/current/functions/aggregate.html#cou...