i have a table that has multiple IDs and need a query to return the sum of a column for each ID. Calls_table looks like this
EmployeeID TypeOfCall InvoiceAmount
John NC 50
john NC 100
Joe NC 76
Joe NC 50
i have it so i have to do it employee by emplyee now like
SELECT sum(InvoiceAmount/2) as "Total Calls"
from Calls
where TypeOfCall='NC' and EmployeeID='Derek';
but i would like it to be able to return all IDs in a list like this
Total Calls
Joe 100
John 68
I am sure i need to use the Distinct parameter but just cant figure out where