我想得到平均值的总和
SELECT
Employees.EmployeeID AS EMPLOYEEID,
Employees.EMPLOYEENAMESURNAMEFORMAT AS LastFirstName,
SUM(MAILCOUNT) MAILCOUNT,
COUNT(*) DAYCOUNT,
AVG(MAILCOUNT) AVERAGE
FROM Employees
LEFT JOIN ST_LAWERP_DAILYMAIL_PERFORMANCE ON Employees.EmployeeID = ST_LAWERP_DAILYMAIL_PERFORMANCE.EMPLOYEEID
WHERE Employees.ACTIVESTATUS = 1
AND Employees.Loginname<>''
AND Employees.Title NOT IN ('Chauffeur','Intern','Summer Intern')
AND ST_LAWERP_DAILYMAIL_PERFORMANCE.DATE BETWEEN '2011-01-01' AND '2015-01-01'
GROUP BY Employees.EmployeeID,Employees.EMPLOYEENAMESURNAMEFORMAT