SUM(CASE ...) statement
Hello!
When C9QL gets across a
SUM(CASE WHEN condition THEN 1 ELSE 0 END) AS test_column
It throws an error. Is there a solution to this? Am I doing something wrong?
-
Hi Gonzalo,
I believe the issue here is that you cant do aggregations on a field in the same step it was created. Remove the sum in this step, add a step, and then take the sum and it should work.
-
Hey Brig!
Yes, that's how I've worked around it :) wanted to see if there was a way of doing it in the one step. No problem!
Thanks
Please sign in to leave a comment.
2 comments