title: Problems with SQL 'WHERE NOT EXISTS'
body: <p>I am building a booking system for cabins, and I am trying to type out all of the Cabins which are not booked over a specific period of weeks. </p>
  
  <p>The Booking table: </p>
  
  <pre><code>CREATE TABLE Booking
  (Customer_IdNr char(10), 
  CONSTRAINT test
  FOREIGN KEY (Customer_IdNr)
  REFERENCES Customer(IdNr)
  ON DELETE CASCADE,
  
  CabinNr integer, 
  BikeNr integer,
  SkiNr integer,
  TotalPrice integer,
  StartWeek integer,
  endWeek integer,)
  </code></pre>
  
  <p>and here I am trying to locate the cabins which are not booked: </p>
  
  <pre><code>SELECT Booking.CabinNr FROM Booking
  WHERE NOT EXISTS 
  (SELECT * FROM Booking
   WHERE 
      StartWeek &gt;= '11'
      AND endWeek &lt;= '15'
  )
  </code></pre>
  
  <p>I have 5 cabins in my table, which all have at least one booking. </p>
  
  <p>I only seem to be able to either locate all the cabins from weeks where nothing is booked, and if I search a week where for instance two cabins are booked, the result is no cabins at all. </p>