I am trying to get a running total query to work. Here is how it works. When a person takes a test and passes with a score of over 80, they get a credit. When they have passed 5 they have 5 credits and are eligble for a 50 cash bonus. One table with employee info and one with the test info with employeeID as the key field.
This query shows an employee with a test of over 80, how do I get it to show a running total of Credits_Earned so I can indicate everytime they have accumulated 5 credits?
SELECT Employees.EmployeeID, Employees.Email, Test.TestID, Test.Test_Score, Test.Credits_Earned, Test.Test_Date
FROM Employees INNER JOIN Test ON Employees.EmployeeID = Test.EmployeeID
GROUP BY Employees.EmployeeID, Employees.Email, Test.TestID, Test.Test_Score, Test.Credits_Earned, Test.Test_Date
HAVING (((Employees.EmployeeID)=140) AND ((Test.Test_Score)>80));
ANy help is appreciated,