Forum

SQL Query to find s...
 
Share:
Notifications
Clear all

SQL Query to find salesmen have more than one customer


Posts: 1
Guest
Topic starter
(@Divya)
New Member
Joined: 3 years ago

SQL Query to find salesmen have more than one customer

SELECT salesman_id, COUNT(*) customer_id

FROM
(

SELECT salesman_id, customer_id FROM Salesman_Customers

GROUP BY 1,2

)a

GROUP BY 1

HAVING customer_id > 1

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: