Customer-Stock-order Database:
Customer (C) (CNO, CNAME, CITY) CNO is th primary key
Order (O) (ONO, CNO, ORDER_DATE) ONO,CNO are primary keys
Order_detail (OD) (ONO, SNO, QTY) ONO,SNO are primary keys
Stock(S) ( SNO, SNAME, PRICE, SLEVEL) SNO is th primary key
1)List the names of the stock items that have been ordered by all customers.
The query looks simple but it took a lot of time to me..it is just using a couple of selects statements and nesting but finally I am ending up confused..
I have tried my best but was unable to come up with the SQL query for the above question. So could anyone please let me know the solution for this query.
Thanks for the support!!I shall be looking forward for responses..
sjy
Customer (C) (CNO, CNAME, CITY) CNO is th primary key
Order (O) (ONO, CNO, ORDER_DATE) ONO,CNO are primary keys
Order_detail (OD) (ONO, SNO, QTY) ONO,SNO are primary keys
Stock(S) ( SNO, SNAME, PRICE, SLEVEL) SNO is th primary key
1)List the names of the stock items that have been ordered by all customers.
The query looks simple but it took a lot of time to me..it is just using a couple of selects statements and nesting but finally I am ending up confused..
I have tried my best but was unable to come up with the SQL query for the above question. So could anyone please let me know the solution for this query.
Thanks for the support!!I shall be looking forward for responses..
sjy