Question: These queries use the CUSTOMERS - PRODUCTS - AGENTS - ORDERS tables. CUSTOMERS ( cid , cname, city, discnt ) AGENTS ( aid , aname,

These queries use the CUSTOMERS-PRODUCTS-AGENTS-ORDERS tables.
CUSTOMERS(cid, cname, city, discnt)
AGENTS(aid, aname, city, percent)
PRODUCTS(pid, pname, city, quantity, price)
ORDERS(ordno, month, cid, aid, pid, qty, dollars)
1) List the name of all products for which an order was placed.
2) List the name of customers that ordered product p07.
3) List name of agents that placed an order for customer c003 or customer c006.
4) List name of customers that ordered product p01 through agent 'a01'.
5) List the name of each customer that placed an order, the pid of what they ordered.
6) List the name of each customer that placed an order and the product name for each product they
ordered.
7) List the name of each customer and the total amount ordered by the customers and also list the
customers that did not place an order.
8) List the name and the sum of dollars for each customer that ordered more than $1,000.
9) List the agent name, product name and customer name for each product ordered.
10) What would be the result of the following SQL Statement: SELECT * From CUSTOMERS,
PRODUCTS
SELECT *
From CUSTOMERS, PRODUCTS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!