Jeg endte med at bruge en løsning, der inkorporerer variabler, baseret på et Stack Overflow-svar indsendt her . Denne løsning ser ud til at være en smule mere fleksibel og effektiv end andre svar.
SELECT u.date,
@running_total := @running_total + u.count AS count
FROM (
SELECT COUNT(*) AS count, DATE_FORMAT(FROM_UNIXTIME(created), '%b %d %Y') AS date
FROM {users}
WHERE created >= :start_time AND created <= :end_time
GROUP BY YEAR(FROM_UNIXTIME(created)), MONTH(FROM_UNIXTIME(created)), DAY(FROM_UNIXTIME(created))
) u
JOIN (
SELECT @running_total := u2.starting_total
FROM (
SELECT COUNT(*) as starting_total
FROM {users}
WHERE created < :start_time
) u2
) initialize;
Bemærk, at kravene til gruppe efter, datoformatering og interval blot er specifikke for mit specifikke projekt. En mere generisk form for denne løsning (i henhold til det oprindelige spørgsmål) ville være:
SELECT u.date,
@running_total := @running_total + u.count AS count
FROM (
SELECT COUNT(*) AS count, DATE(FROM_UNIXTIME(created)) AS date
FROM {users}
GROUP BY date
) u
JOIN (
SELECT @running_total := 0
) initialize;