query to retrieve totals for each employee

  • Thread starter Thread starter Justin
  • Start date Start date
J

Justin

I have a table called: csr, with the following structure: ID, Name,
PIN, NumCalls. The only thing unique is the ID field. There's many
entries for each CSR, e.g.

ID Name PIN NumCalls
1 Joe 555 10
2 Joe 555 30
3 Joe 555 20

As you can see, Joe(name) and 555(pin) remain the same but we have a
new value for NumCalls. I want a sql statement that will return the
following: Joe, 555, 60.

What would that sql statement look like?

The results will be tied to a report...

Thanks
 
Hi,
Something like this should work:

Select Sum(NumCalls) As SumOfCalls, Name,PIN From
csr Group By PIN,Name
 
Ahh... I didn't have the "group by" in there and I kept getting the
infamous "aggregate function" error message.

Thanks a bunch!!! I'm very greatful.
 
Back
Top