Grouping query problem

  • Thread starter Thread starter Frank
  • Start date Start date
F

Frank

i have 3 tables; clients, salesman, general - salesman
relates to clients, clients to general. based on date
parameters (beginning and date) from recd-date in general
table i need to find out how many clients each salesman
has dealt with.
Thanks in advance
Frank
 
Hi,



SELECT salesman, COUNT(*)
FROM (SELECT DISTINCT salesman, ClientID
FROM sales
WHERE recdDate BETWEEN beginning AND ending )
GROUP BY salesman



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top