Your question is Professor-Course Cross-Department Query. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Catalist maintains an internal course catalog for technical and research training. Write a PostgreSQL query that returns each professor's name and every course they teach outside their own department.
A professor or course with a NULL department should not qualify as an outside-department match because the comparison is unknown.
| Column | Type | Description |
|---|---|---|
| professor_idPK | INT | Unique professor identifier |
| professor_name | VARCHAR(100) | Professor's full name |
| department | VARCHAR(100) | Professor's academic department |
| Column | Type | Description |
|---|---|---|
| course_idPK | INT | Unique course identifier |
| course_name | VARCHAR(150) | Course title |
| department | VARCHAR(100) | Department that owns the course |
| Column | Type | Description |
|---|---|---|
| professor_id | INT | Assigned professor identifier |
| course_id | INT | Assigned course identifier |