Monday

October 20, 2014

October 20, 2014

Posted by **joe** on Friday, July 22, 2011 at 10:45pm.

b) Write the same query as above, but using a scalar subquery,without outerjoin.

- SQL -
**DrBob222**, Friday, July 22, 2011 at 11:03pmHow would you like for us to help you?

- SQL -
**joe**, Saturday, July 23, 2011 at 2:35pmThis 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.

- SQL -
**MathMate**, Saturday, July 23, 2011 at 4:04pmIf you give it an attempt, we can help you comment on your answer.

Also, are you running MS SQL server or oracle?

- SQL -
**joe**, Saturday, July 23, 2011 at 7:26pmIm 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.

- SQL -
**MathMate**, Saturday, July 23, 2011 at 9:28pmAs 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.

**Answer this Question**

**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. - A spinner is divided into 8 equal sections. There are 3 yellow sections ...

GeoGraphy and History - What are the sections of the world ( i am having trouble...

AP BIO - a scientist plans to use a microtome to cut sections of a particular ...

Math - Virginia will spin each spinner once. What is the total number of ...

Math - Larry has 36 sections of wooden fencing. Each section is 6 feet long. He ...

maths-probability - The diagram shows a spinner with six numbered sections.(...

Career - What are some counter or window display ideas for an auto detailing ...