reset password
Author Message
ahnman341
Posts: 22
Posted 11:24 Oct 28, 2015 |

Using university-create.sql

Given a question:  Find the names of all courses that only faculty member 'Turing' teaches.  (No other instructor can teach the course).  How would you write the query?  Also, in long form could you include your approach to solving the problem?

 

My approach using intersection:

1.  find all the courses that 'turing' teaches

2.  find all the courses taught by other faculty

3.  find the intersection of query 1 and query 2

4.  take query 1 and subtract query 3 and return the result

But I can't seem to implement my thoughts.

 

Another approach using outer joins:

1.  find all the courses that 'turing'

2.  find all the courses that other faculty teach

3.  left outer join query 1 and query 2

4.  return results where something is null???? 

Additional commentary on my two approaches are welcome.  Good luck on the midterm everyone.

AndersonChristoph
Posts: 34
Posted 11:30 Oct 28, 2015 |

Come to E&T A 308. There are 6 of us working on the practice midterm.