Supplier(Sno, Sname)
Part ( Pno, Pname )
Project (Jno, Jname)
Supply (Sno, Pno, Jno)
I need to write a query to:
retrieve the part numbers that are supplied to exactly to exactly two projects
what I wrote was:
SELECT Pno FROM Supply WHERE (SELECT COUNT(Pno) from Supply)=2;
I do however think this is wrong as when I run a similar query on a table I have, it returns an empty set ... I essentially just want to pull the elements that their are 2 of in a specified column.