I'm trying to join a few tables to produce a list of classes that have prerequisite. All is well except for the fact that I need the class names for BOTH the prerequisites and the original class.
So far i have
SELECT course_name, c.course_number, course_name, prereq
FROM rearp.course c, rearp.prereq p
WHERE c.course_number = p.course_number;
which gives me (you can already see an issue the course_name is in there twice[no idea how to handle it otherwise])
- the course name (okay good)
- the class (yep)
- the course name again (wait that's the same name!)
- the prerequisite (good)
Ignore the format just note that the course names or the prerequisites corresponds only with the original course not the prerequisites.
My issue is that I cant get the names to match up.