title: SQL query for distinct professors and courses
body: <p>The question is stated as there is a database on professors, departments, courses and schedules. Need to write a query that returns the names of all the professors and their respective courses. Each row must contain the name of the professor followed by the name of the course that the professor teaches. There must be no duplicates in terms of the rows. </p>
  
  <p>The schema I have, in terms of the table name and the fields: </p>
  
  <pre><code>PROFESSOR: ID, NAME, DEPARTMENT_ID, SALARY
  DEPARTMENT: ID, NAME
  COURSE: ID, NAME, DEPARTMENT_ID, CREDITS
  SCHEDULE: PROFESSOR_ID, COURSE_ID, SEMESTER, YEAR
  </code></pre>
  
  <p>The code I have right now: </p>
  
  <pre><code>SELECT DISTINCT p.Name AND c.NAME
  FROM Prodessor p, Course c, Schedule S
  
  WHERE
      p.DEPARTMENT_ID = c.DEPARTMENT_ID
      AND
      p.ID = s.PROFESSOR_ID
      AND
      c.ID = c.COURSE_ID
  </code></pre>
  
  <p>The result I get is a list of all professors, but there aren't multiple courses, just a single one. What's going wrong here? It also mentioned that PROFESSOR.ID is foreign to COURSE.PROFESSOR_ID, so <code>p.ID = s.PROFESSOR_ID</code> is valid</p>