This query is returning the error “ambiguous column name courses.scheduleNumber”. I searched for a solution to the problem, however, a commonly suggested fix was to qualify all of the column names with the table name, which I have already done.
SELECT
courses.scheduleNumber,
courses.subject,
courses.courseNumber,
courses.sectionNumber,
courses.credits,
courses.title,
courses.room,
courses.days,
rooms.building,
rooms.room,
courses.startTime,
courses.endTime,
courses.instructor
FROM courses
LEFT JOIN courseRooms
ON courses.scheduleNumber=courseRooms.scheduleNumber
LEFT JOIN courses
ON courseRooms.building=rooms.building AND courseRooms.room=rooms.room;
I think you mean for that final
LEFT JOIN coursesto be aLEFT JOIN rooms?