title: SQL Row_Number() increase only when the value = 1 for a specific column
body: <p>I am having some trouble generating row_number() in my SQL query as my expectation. I have this following output of my query-</p>
  
  <p><a href="https://i.stack.imgur.com/yki6q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yki6q.png" alt="enter image description here"></a></p>
  
  <p>Now, I want to add row number for all rows where row number will only increase when the value in C1 is = 1. Required output as below-</p>
  
  <p><a href="https://i.stack.imgur.com/ke4tU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ke4tU.png" alt="My Required Output"></a></p>
  
  <p>Any help will be appreciated. TIA</p>