Posted by joe on Friday, July 22, 2011 at 10:45pm.
How would you like for us to help you?
This is a practice problem that the book has no answer for and needed to see how these two problems are done so i can be prepared for a test next week. The both need to be written in structured query langauge.
If you give it an attempt, we can help you comment on your answer.
Also, are you running MS SQL server or oracle?
Im am running oracle.
Here is what i have for the first query:select ID, name,
from instructor natural left
outer join section
where sec_id >= 0.
As a start, you may want to display the sections so you can manually count how many there are for each instructor for comparing with later results.
I believe the out join syntax looks like this:
select ID, name, section from instructor outer join on instructor.section = courses.section;
You will have to experiment with the different parameters of the outer join clause to get exactly what you want.
Once this is done, you can remove the many printed lines using count() function to return the number of sections each instructor teaches.
Related Questions
structured query language math - Display a list of all instructors, showing ...
math write in sql - I have this question i need to know how to do for a test ...
math write in sql - Display the list of all departments, with the total number ...
Math I really need help! - http://www.jiskha.com/display.cgi?id=116...
Mat 126 - A community college has 3,000 students and 90 instructors. The college...
Database Design (SQL) - Hi I need help creating an SQL query to display each ...
Database Design (SQL) - Hi I need help creating an SQL query to display each ...
Computer Science - Can anyone please write a basic c++ code for the following ...
testing and selection of dogs - please check this for me thank you Why should ...
communication - three charateristics of verbal communication for audience in a ...
For Further Reading