reset password
Author Message
harry_520
Posts: 76
Posted 12:10 Oct 24, 2013 |

Q9. Find the names of the suppliers who supply every red part.

What does "every red part" mean?

cysun
Posts: 2935
Posted 15:26 Oct 24, 2013 |

Suppose you have three red parts in your database. If a supplier supplies all three red parts, the supplier should be in the result.

I guess there's a corner case where there's no red part in the database. Your query doesn't need to handle this case.

harry_520
Posts: 76
Posted 17:16 Oct 24, 2013 |
cysun wrote:

Suppose you have three red parts in your database. If a supplier supplies all three red parts, the supplier should be in the result.

I guess there's a corner case where there's no red part in the database. Your query doesn't need to handle this case.

 So, the result should only contain zero or one record?

cysun
Posts: 2935
Posted 17:18 Oct 24, 2013 |

The result should contain all the suppliers who supply all the red parts.

harry_520
Posts: 76
Posted 20:54 Oct 24, 2013 |
cysun wrote:

The result should contain all the suppliers who supply all the red parts.

 It seems like this question is as same as question 10.

10. Find the names of the suppliers who supply only red parts.

Dr, Sun. Can you explain this one to me? I really get confused between question 9 and question 10.

cysun
Posts: 2935
Posted 22:39 Oct 24, 2013 |

Suppose there are three red parts and two blue parts in the database, and Supplier A supplies all three red parts and one of the blue parts, and Supplier B supplies only one red part.

Supplier A should be in the results of Q9 but not Q10, and Supplier B should be in the results of Q10 but Q9.