Skip to content
Advertisement

Tag: analysis

Partition by with condition statement

I have data of products that are sold by various shops. For some shops they are sold with discount mapped by PROMO_FLG. I would like to display two COUNT PARTITION columns. First displays all shops that thave this product (which is done) COUNT(DISTINCT STORE) OVER (PARTITION ITEM) would give is 10 Second one – which I seek – counts only

Advertisement