title: Partition by with condition statement
body: <p>I have data of products that are sold by various shops. For some shops they are sold with discount mapped by <code>PROMO_FLG</code>.
  I would like to display two <code>COUNT PARTITION</code> columns.</p>
  
  <pre><code>+-------------------------+--------------+---------------------+
  | Store                   | Item         | PROMO_FLG|
  |-------------------------+--------------+---------------------|
  | 1                       |            1 |                   0 |
  | 2                       |            1 |                   1 |
  | 3                       |            1 |                   0 |
  | 4                       |            1 |                   0 |
  | 5                       |            1 |                   1 |
  | 6                       |            1 |                   1 |
  | 7                       |            1 |                   1 |
  | 8                       |            1 |                   0 |
  | 9                       |            1 |                   0 |
  | 10                      |            1 |                   0 |
  +-------------------------+--------------+---------------------+
  </code></pre>
  
  <p>First displays all shops that thave this product (which is done)</p>
  
  <p><code>COUNT(DISTINCT STORE) OVER (PARTITION ITEM)</code> would give is 10</p>
  
  <p>Second one - which I seek - counts only these shops that have value in <code>PROMO_FLG = 1</code> attribute. </p>
  
  <p>That should give us value of <code>4</code></p>