title: SQL Server Update Group by
body: <p>I'm trying to execute this on MS-SQL but returns me an error just at the Group by line</p>
  
  <pre><code>update #temp
  Set Dos=Count(1)
  From Temp_Table2010 s
  where Id=s.Total and s.total in (Select Id from #temp)
  group by s.Total
  </code></pre>
  
  <p>Do anyone knows how can I solve this problem having good performance.</p>