Write a query to return a list of professor names and their associated courses for all courses
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a query to return a list of professor names and their associated courses for all
courses outside of their departments. There should be no duplicate rows, but they can b
in any order.
The output should contain two columns: professor.name, course.name.
Sample Output
Tyler Rodriguez Astronomy
Jordan Myers Earth Sciences
Alex Daniels Materials Science and Metallurgy
Ellis Vasquez Materials Science and Metalurgy
Tyler Rodriguez Geography
Peyton Stevens Applied Mathematics and Theoretical Physics
Riley Gilbert Earth Sciences
Alex Daniels Pure Mathematics and Mathematical Statistics
Alex Daniels Applied Mathematics and Theoretical Physics
Alex Daniels Materials Science and Metallurgy
Explanation
Example logic
1. Professor Tyler Rodriguez's department id is 3, but the Astronomy course's department id is 1.
2. Professor Jordan Myers's department id is 4, but the Earth Sciences course's department id is 1
Related Book For
Modern Database Management
ISBN: 978-0133544619
12th edition
Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi
Posted Date: