I'm using the following statement to read out user-registrations
SELECT DAY(p.creationInstant) as day, MONTH(p.creationInstant) as month,
YEAR(p.creationInstant) as year, count(p.id) as users
FROM person p WHERE p.enrollmentStatus ="Enrolled"
GROUP BY year, month, day
ORDER BY year, month, day
This will give me the following output:
day month year users
1 1 2013 3
2 1 2013 5
3 1 2013 7
...
Now I'd like to have a 4th column that sums up the users:
day month year users **totalUsers**
1 1 2013 3 3
2 1 2013 5 8
3 1 2013 7 15
...
But somehow I can't figure it out how to do it with SQL (dbms: mySQL).