title: COUNT with CASE in oracle
body: <p>I need to take count of data from one table and if count is more than 1  need to get result as 'YES' and count equal to 1 I need to get result as 'NO'.</p>
  
  <p>Query :</p>
  
  <pre><code>Select item,
         case
           when count( item_des) &gt; 1
           then 'REassigned Yes'
           when count(item_des) = 1
           then 'REassigned NO' else 'N/A' end 
         from material
         where item  in ('23','24,'25') and item_des like ('Cpu%to%move%')
         group by item;
  </code></pre>
  
  <p>Each item number has multiple entries with <code>items_des</code> column, and I need to take count of <code>item_des</code> column where <code>item_des like ('Cpu%to%move%')</code> and do the count and print the result based on the count.</p>