programming-examples/sql/Joins/Write a SQL statement to know which salesman are working for which customer.sql

6 lines
251 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a SQL statement to know which salesman are working for which customer.*/
SELECT a.cust_name AS "Customer Name",
a.city, b.name AS "Salesman", b.commission
FROM customer a
INNER JOIN salesman b
ON a.salesman_id=b.salesman_id;