title: SQL Server UPDATE multiple row value from another table
body: <p>I have a table contain Id and Rcount. I need to update the Rcount for every member. Something like this</p>
  
  <pre><code>Id| Rby| Rcount
  1 | 0  | 0
  2 | 1  | 0
  3 | 1  | 0
  4 | 3  | 0
  5 | 4  | 0
  6 | 4  | 0
  7 | 4  | 0
  8 | 7  | 0
  </code></pre>
  
  <p>I get the value by using</p>
  
  <pre><code>SELECT Rby, COUNT(Rby) FROM member GROUP BY Rby;
  
  Rby| COUNT(Rby)
  0  | 1
  1  | 2
  3  | 1
  4  | 3
  7  | 1
  </code></pre>
  
  <p>How can i update the result to the column Rcount??</p>