The management of the shoe factory
wants a report of orders which lists three
columns: Order_No, corresponding
customer name, and phone number.
SELECT order_no , name, phone
FROM orders, customers
WHERE
orders.cust_code = customers.cust_code;
The management wants a four-column
report containing order_no, order_qty,name of the corresponding shoe and
its cost. -
SELECT order_no , Order_Qty, name, cost
FROM
orders, shoes WHERE Shoe_Code = code;
SELECT name, address FROM orders, customers
WHERE orders.cust_code = customers.cust_code
and
order_qty > 300;
SELECT order_no, Order_Qty, customers.name,
cost*order_qty as 'Order Cost'
FROM orders, shoes, Customers
WHERE Shoe_Code = code
and Orders.Cust_Code = Customers.Cust_Code
order
by order_no;
No comments:
Post a Comment