Puedes usar una subconsulta
Tabla de muestra
create table visits (day int, userid char(1));
insert visits values
(1,'a'),
(1,'b'),
(2,'b'),
(3,'a'),
(4,'b'),
(4,'c'),
(5,'d');
La consulta
select d.day, (select count(distinct userid) from visits where day<=d.day)
from (select distinct day from visits) d