Forum

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

SQL Query to find salesmen have more than one customer


Divya
Posts: 1
 Divya
Topic starter
(@Divya)
Joined: 2 months 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
1 Reply
jeevan 123
Posts: 18
(@jeevan303500)
Active Member
Joined: 1 year ago

Query and the results attached.

SQL Query to find salesmen have more than one customer.

Reply


Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: