title: UPDATE table using IN and COUNT
body: <p>I am updating my table setting a field named "status" based on the condition that the total number of distinct rows should be more than 10 and less than 13. The query is as follows:</p>
  
  <pre><code>update myTable set status='Established'
  where id IN(select id, count(*) as c 
              from myTable 
              where year&gt;=1996 and year&lt;=2008 
      group by id
      having count(distinct year)&gt;=10 and count(distinct year)&lt;=13)
  </code></pre>
  
  <p>The problem is, I'm getting error1241 that is "operand should contain 1 column"! Could you please advise how can I solve this? Thanks!</p>