title: help with oracle sql case statement using count criteria
body: <p>So far, this query works using exists:</p>
  
  <pre><code>SELECT CASE WHEN EXISTS
                     ( SELECT *
                       FROM TEST1
                       WHERE timestamp = to_char(sysdate-1, 'yyyymmdd') || '0000'
                     )
              THEN 0
              ELSE 1
         END AS FLG
  FROM dual
  </code></pre>
  
  <p>Now, I need to add another criteria.
  Since my data has these consistent count values of 100 for example:</p>
  
  <pre><code>SQL&gt; select count(*), timestamp from TEST1 group by timestamp order by 2 desc;
  
    COUNT(*)  TIMESTAMP
  ---------- ----------
        100 2.0111E+11
        100 2.0111E+11
  </code></pre>
  
  <p>I now need to alter this query so that I get only those that have a count(*) of <code>100</code>
  and if they do then set my flag = 0 and if not set my flag =1.</p>
  
  <p>I'm not sure where to add this count criteria value of 100. Can I still use CASE for this? </p>