Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sql question

Author  Topic 

richipal
Starting Member

4 Posts

Posted - 2009-07-31 : 11:11:10
I have a sql question
given these tables

professor(profname, deptname)
department(deptname, building)
committee(commname, profname)


Find the names of all the professors who are in exactly (i.e., no more and no less) all those committees that
Professor Piper is in.

data in committee table is

COMMNAME PROFNAME
------------------- -----------
Operation James
Operation William
Communication James
Communication Piper
Communication Oliver
Communication Lewis
Teaching James
Teaching Piper
Teaching Matthew
Teaching Lewis
Graduate Admissions William
Graduate Admissions George
Computing Matthew


Answer: only Lewis should show

can you please help with SQL for the above situation
Thanks in advance

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2009-07-31 : 11:36:22
Why don't you just go ahead and post all the other questions from you homework and save us some time.

________________________________________________
If it is not practically useful, then it is practically useless.
________________________________________________
Go to Top of Page
   

- Advertisement -