Aggregate function with case expression
I am trying to use the aggregate function with a CASE expression but I am not getting the syntax right.
I am attaching the sample code with the question on what I am trying to achieve but I get the syntax error.
count(case when weekminus1 = 0 and week0 = 1 then distinct(asin) end) as asin_added,
count(case when weekminus1 = 0 and week0 = 1 then distinct(fnsku) end) as fnsku_added,