title: Oracle SQL Exclude row from query results
body: <p>I have two tables in Oracle SQL:</p>
  
  <p>PROJECT (<strong>PID</strong>, Pname, Budget, <em>DID</em>)</p>
  
  <p>DIVISION (<strong>DID</strong>, Dname)</p>
  
  <p><strong>Bold</strong> = Primary key</p>
  
  <p><em>Italic</em> = Foreign key</p>
  
  <p>I want to list the division that has more projects than the division marketing.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>select dname as "Division"
  from division d, project p
  where d.did = p.did
  group by dname
  having count(pid) &gt;= all
  (select count(p.pid)
  from project p, division d
  where p.did = d.did and d.dname = 'marketing')  
  </code></pre>
  
  <p>I return the correct record but also the marketing record. How can I exclude the marketing record from the results?</p>