Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL Programming

JOINs Question

Give the name of the course, the number of credit hours, the name of the instructor, the time and day of the course and the roomNo for all classes taught in room 1150.


Using the database provided, Write and Execute SELECT statements to get the following information:

Courses - https://i.stack.imgur.com/QZdQx.jpg

Instructors - https://i.stack.imgur.com/7ggnk.jpg

Sections - https://i.stack.imgur.com/6p0LR.jpg

Students - https://i.stack.imgur.com/sBmX1.jpg

StudentSchedule - https://i.stack.imgur.com/cTbrl.jpg

StudentSchedule Part 2 - https://imgur.com/a/gxrm8Dy

What I have tried:

SQL
SELECT Courses.CourseName, Courses.CreditHours, Instructors.FirstName, Instructors.LastName, Sections.TimeDays, Sections.RoomNo 
FROM Courses, Sections, Instructors 
WHERE Courses.CourseID = Sections.CourseID 
AND Sections.Instructor = Instructors.ID 
AND Sections.RoomNo='1150';


Result: Imgur: The magic of the Internet[^]

How do I fix it?
Posted
Updated 7-Nov-18 0:55am

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think! If you need a JOIN - and you probably do - then use a JOIN: SQL Joins[^]

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 
At this point, it is well into the semester. If you cannot or will not do your own work at this point - what will you do when the problems start to get difficult.

What have you done until now to learn to look up the How-To's for TSQL ?

Do yourself a major favor and sit back for a while and consider what you are doing in any type of computer/technical course - are you will to do the work? If not, you won't get the salary you imagine, and very likely, not be able to keep a job, either.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900