The sum for each person (1 Viewer)

ariansman

Registered User.
Local time
Yesterday, 19:34
Joined
Apr 3, 2012
Messages
157
We have the following table:
Code:
         EmpName     Payment   
   1       Jack      160
   2       Steve     95
   3       John      47
   4       Jack      25 
   5       kate      12
   6       John      23  
   7       Kate      21

How can we get the sum for each person? A result like the following:

Code:
 EmpName   Payment   
  Jack      185
  Steve     95
  John      70
  Kate      33
I don’t know much about access. I would appreciate for a sql syntax.
Thank you
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 19:34
Joined
Oct 29, 2018
Messages
21,453
Hi. You could try something like:
Code:
SELECT EmpName, Sum(Payment) As TotalPayment FROM TableName GROUP BY EmpName
 

mike60smart

Registered User.
Local time
Today, 03:34
Joined
Aug 6, 2017
Messages
1,908
Hi

It would make life a lot easier if you had 2 tables

1 for the Employees
1 for the EmployeePayments

Usual setup is a Main form based on tblEmployees and a Subform based on tblEmployeePayments
 

Users who are viewing this thread

Top Bottom