programming-examples/sql/Subqueries/3. Write a query to find all the orders issued against the salesman who works for customer whose id is 3007.sql

7 lines
252 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*3. Write a query to find all the orders issued against the salesman who works for customer whose id is 3007.*/
SELECT *
FROM orders
WHERE salesman_id =
(SELECT DISTINCT salesman_id
FROM orders
WHERE customer_id =3007);