Simple SQL Query. [message #20719] |
Fri, 14 June 2002 20:56 |
karunamoorthy_p
Messages: 13 Registered: April 2002
|
Junior Member |
|
|
consider the following relations;
SHOP(SHOP_NO), SHOP_NAME, ADDRESS, OWNER)
CUSTOMER(C-NO, C_NAME, C_ADDRESS0
ITEM(I_NO, I_NAME)
SUPPLIED(I_NO, C_NO, SHOP_NO, DATE, PRICE)
REQUIRES(C_NO, I_NO)
SUPPLIED database gives data about items supplied by a shop to a customer and REQUIRES gives data about items required by a customer.
Queries:
1) names of customers who have been supplied items of maximum total value.
2) names of customers who require items which have not been supplied(along with item names).
3) names of customers who are supplied all the items from only one shop.
4) list of shop owners who supplied all the items from only one shop.
5) list of shop owners who supplied some item to the address "FIRST STREET".
pl hlp.
|
|
|
|