title: Query to find courses that all members are enrolled in
body: <p>I have a database which contains 5 tables.</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE COURSES 
  (
      CourseID INT PRIMARY KEY,
      CourseName VARCHAR(100),
      Credit  NUMBER(10,2)
  );
  
  CREATE TABLE TEACHERS 
  (
      SSN VARCHAR(100)
      Name VARCHAR(100)
  );
  
  CREATE TABLE OFFER 
  (
      CourseID NUMBER(10), 
      SSN VARCHAR(100)
  );
  
  CREATE TABLE STUDENTS 
  (
      StudentID NUMBER(10),
      Name VARCHAR(100),
      Department NUMBER(10)
  );
  
  CREATE TABLE ENROLL 
  (
      StudentID NUMBER(10),
      CourseID NUMBER(10),
      Semester VARCHAR(100)
  );
  </code></pre>
  
  <p>And I want to find the names of courses that are enrolled by all “Automotive Engineering” students.</p>
  
  <p>I tried the below statements but it shows nothing.</p>
  
  <pre><code>SELECT C.CourseID
  FROM COURSES C
  WHERE NOT EXISTS (SELECT S.StudentID
                    FROM STUDENTS S
                    WHERE NOT EXISTS (SELECT E.CourseID
                                      FROM ENROLL E
                                      WHERE S.Department = 'Automotive Engineering'
                                        AND E.CourseID = C.CourseID 
                                        AND E.StudentID = S.StudentID)
                   )
  </code></pre>
  
  <p>I execute the above query but it shows nothing. Can someone help me from here? </p>