title: SQL query for the same table
body: <p>I have a table in oracle with columns like ID and J_Code</p>
  
  <pre><code>ID             J_Code
  ---------------------------------------------
  1234           C1234
  1234           FGH89
  1234           BNMG9
  1234           AIOBN
  
  7890           CVBN0
  7890           FGHJK
  7896           LKJHIN
  </code></pre>
  
  <p>I need to write a sql query which would return me count where J_code starts with C but not with A for a given ID. At runtime we would pass ID. So when ID=1234, the count should be 0 as we do have 'AIOBN' there. But when I pass 7890 the count should be 1. Is this possible using a nested query or self join ?</p>