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 |