programming-examples/sql/Subqueries/11. Write a query to find the name and numbers of all salesmen who had more than one customer.sql
2019-11-18 14:05:53 +01:00

6 lines
148 B
SQL

SELECT salesman_id,name
FROM salesman a
WHERE 1 <
(SELECT COUNT(*)
FROM customer
WHERE salesman_id=a.salesman_id);