title: WOS count in sql
body: <p>I currently have a projected inventory amount for the next 6 months. I want to count the number of positive values, but want to stop the count once it reaches a negative value, even if there are positive numbers after the negative values.
  product
  <a href="https://i.stack.imgur.com/aEopX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aEopX.png" alt="| product| warehouse |date | projected inventory |
  | -------- | -------------- |-------- | -------------- |
  | 1    | US         |1/1    | 100            |
  | 1  | US         |1/2   | 50          |
  | 1   | US           |1/3  | 0            |
  | 1  | US            |S1/4   | -50            |
  | 1  | US       |1/5  | -100           |
  | 1   | US          |1/6   | 100          |
  | 1  | US           |1/7   | 50          |
  | 1   | US           |1/8   | 50         |" /></a></p>
  <p>The sql code needs to state that I have a current projected weeks of supply of 2 since i only have 2 positive projected inventory amounts for initially, even when there are positive values starting 1/6.</p>