From the following tables write a SQL query to find the salespeople who deal the customers with more than one order
- برمجة سي كيو ال sql
- 2021-09-01
- mhanasmh00489829403
الأجوبة
SELECT *
FROM salesman a
WHERE EXISTS
(SELECT * FROM customer b
WHERE a.salesman_id=b.salesman_id
AND 1<
(SELECT COUNT (*)
FROM orders
WHERE orders.customer_id =
b.customer_id));
Output of the Query:
salesman_id name city commission 5001 James Hoog New York 0.15 5002 Nail Knite Paris 0.13 5003 Lauson Hen San Jose 0.12
أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال