I have 3 columns namely EntryDate,EnteredBy,Boxcodes in a table. I want to know how much BoxCodes each person (enteredby) has entered in all entrydates. The following pivot table query doesn't sums up the total for each person for each day.
SELECT 'TotalBoxes' AS TotalBoxes,EntryDate AS [DOE],EnteredBy AS [USERS]
(SELECT BoxCode,EntryDate,EnteredBy FROM Patient_vw
WHERE EntryDate > '2013-05-01' AND BoxCode IS NOT NULL
GROUP BY BoxCode,EntryDate,EnteredBy)AS pw
FOR BoxCode IN ([DOE],[USERS])
) AS Pvt
Please help on this