Sum(CASE WHEN "ActivityTable"."Activity" = 'something'
THEN 1.0 ELSE NULL END) gives me the count when there is an entry "something" in the table.
My challange is following:
I need to count Distinct Case_ID, whenever "something" happens. It can happen more than 1 time for an Case_ID, so i need a PQL statement like:
CASE WHEN "ActivityTable"."Activity" = 'something'
THEN count (Distinct(Case_ID) ELSE NULL END, which is ofcourse not working like this.
Ideas and solutions are welcome. Thanks a lot