I’ve got a N1QL query with a number of columns similar to this:
sum( case when lastSeen <= 600000 then 1 else 0 end ) as countLast10Min,
This may be a premature optimaztaion, but I was curious if there was an aggregate that would directly count true values. Along the lines of:
countTrue( lastSeen <= 600000 ) as countLast10Min,
Again, what I have in the first example works, I just wanted to make sure I wasn’t missing a simpler or more performant alternative.