title: SQL query to retrieve all the professors
body: <p>Tables:</p>
  
  <ul>
  <li>Professor (EMP ID, Name, Status, Salary, Age)</li>
  <li>Course (Course ID, Course Name, PoINts)</li>
  <li>Works (Course ID, EMP ID, Class ID)</li>
  </ul>
  
  <p>This is my db schema and from that schema I need to get:</p>
  
  <blockquote>
    <p>Return those courses that have been taught by ALL professors. </p>
  </blockquote>
  
  <p>I have written the following query which is obviously wrong can anyone please help me as I am new to SQL.</p>
  
  <pre><code>SELECT 
      c.coursename
  FROM  
      professor p, works w, course c
  WHERE 
      p.empid = w.empid
      AND w.courseid = c.courseid
      AND p.empid IN (SELECT all(empid) FROM professors)
  </code></pre>