count combined with if
Content
Hi all,
maybe I am thinking too complicated, but there is a challenge I have currently no solution for:
I am trying to count records with an if condition. That indeed would not be a problem, but now I want to combine 2 conditions in the expression and I am absolutely not aware how to do that, as I always get errors.
Example:
count(distinct if(tableX.field1 = 1 and tableY.field2=2, transactions.id))
What is the mistake I make?
Thanks for any hint in advance
Kai
Tagged:
0