title: How to Update multiple rows having specific count with Group by clause?
body: <p>I want to update multiple rows that have specific count number (count(*)=2) with number 40. Consider the following example:</p>
  
  <pre><code>create table test(id int not null primary key, day date not null, tst int not null  );
  insert into test(id, day, tst) values(1, '2006-10-08', 0);
  
  insert into test(id, day, tst) values(2, '2006-10-08', 0);
  
  insert into test(id, day,tst) values(3, '2006-10-09', 0);
  </code></pre>
  
  <p>I have used the following query <code>UPDATE test SET tst = 40 WHERE (select day from test GROUP BY day having count(*)=2);</code></p>
  
  <p>But it never works. Any help please...</p>
  
  <p>Thanks.</p>
  
  <p>Aymen</p>