programming-examples/sql/Subqueries/7. Write a query to display all the customers whose id is 2001 bellow the salesman ID of Mc Lyon.sql
2019-11-18 14:05:53 +01:00

7 lines
239 B
SQL

/*7. Write a query to display all the customers whose id is 2001 bellow the salesman ID of Mc Lyon.*/
SELECT *
FROM customer
WHERE customer_id =
(SELECT salesman_id -2001
FROM salesman
WHERE name = 'Mc Lyon');