I have logging entry table with the relevant following columns: eventype
, userid
. I can simply summarise the data using the following query to get a total for each user event type
SELECT EventType, COUNT(EventUserID) AS Total, EventUserID
FROM dbo.vSystemEventLog AS SE
GROUP BY EventType, EventUserID
However i need also to have running total for each individual eventtype regardless of user. How do i go about this?
Cheers
I think this might be what you want:
I not entirely sure what you want - sample output and/or data would be most helpful.
However, I am guessing you need to group it the other way round so that the query groups by
EventUserId
first.Ok - so I have created this test data & SQL. I think this is what you want.
This produces the following output: