title: Oracle SQL -- Getting List of Vendors That Do Not Sell Specific Items
body: <p>I have a question on my homework that is baffling me.</p>
  
  <blockquote>
    <p>List every vendor identification number and vendor name that does not
    supply ‘power range’ and ‘power screw driver’.</p>
  </blockquote>
  
  <hr>
  
  <p>So, we have a vendor, vendorcatalog, and inventorydes table.</p>
  
  <p><strong>Vendor</strong></p>
  
  <p>vid (vendor ID - primary key)
  vendorname
  address</p>
  
  <p><strong>Vendorcatalog</strong></p>
  
  <p>vid (vendor ID)
  itemno (item number)</p>
  
  <p>Both are primary keys.</p>
  
  <p><strong>Inventorydes</strong></p>
  
  <p>itemno (primary key)
  itemdescription</p>
  
  <hr>
  
  <p><strong>Current Query</strong></p>
  
  <pre><code>SELECT vid, vendorname 
      FROM  (SELECT vendor.vid, vendor.vendorname 
                 FROM inventorydes, vendor, vendorcatalog 
                 WHERE inventorydes.itemno = vendorcatalog.itemno 
                     AND vendorcatalog.vid = vendor.vid 
                     AND inventorydes.itemdescription NOT IN ('power range', 'power screw driver'))
  </code></pre>
  
  <p>This shows all of the vendors that do not supply the item, but then it lists each vendor for each item they sell.  What I need just a list of the vendor IDs with the vendor name, not the vendor IDs with the vendor names for each item that is being sold.</p>
  
  <p>So, what I need is a SQL query (being run on an Oracle database) that will get each of the vendor IDs that does not supply the power range and power screw driver.</p>
  
  <p>The end output should be this:</p>
  
  <p>v1 | this vendor's name<br/>
  v2 | this vendor's name<br/>
  v3 | this vendor's name</p>
  
  <p>There are only 4 vendors and the 4th vendor is the one that supplies the power range and power screw driver.</p>