title: Update Variable based on Group
body: <p>I need to perform an update to a field in a table with a variable, but I need the variable to change when the group changes. It is just an INTt, so for example if I The example below I want to update the record of texas with a 1 and flordia with the next number of 2:</p>
  
  <p>UPDATE table 
  set StateNum = @Count
  FROM table
  where xxxxx
  GROUP BY state</p>
  
  <p>Group         Update Variable
  Texas         1
  Texas         1
  Florida       2<br>
  Florida       2
  Florida       2</p>