SQL Subquery Exercises: Find all the customers whose id is 2001 bellow the salesman ID of Mc Lyon
SQL SUBQUERY: Exercise-7 with Solution
7. Write a query to display all the customers whose id is 2001 bellow the salesman ID of Mc Lyon.
Sample table : Customer
Sample table: Salesman
SELECT * FROM customer WHERE customer_id = (SELECT salesman_id -2001 FROM salesman WHERE name = 'Mc Lyon');
customer_id cust_name city grade salesman_id 3005 Graham Zusi California 200 5002
Contribute your code and comments through Disqus.
What is the difficulty level of this exercise?