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: 2 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
1 Reply
Posts: 18
(@jeevan303500)
Active Member
Joined: 3 years ago

Query and the results attached.

SQL Query to find salesmen have more than one customer.

Reply

Self Learning Video Tutorials - Software Course

Leave a reply

Author Name

Author Email

Title *

 
Preview 0 Revisions Saved
Share: