/*6. Write a query to create a view that shows for each order the salesman and customer by name.*/
CREATE VIEW nameorders  
AS SELECT ord_no, purch_amt, a.salesman_id, name, cust_name  
FROM orders a, customer b, salesman c  
WHERE a.customer_id = b.customer_id  
AND a.salesman_id = c.salesman_id;