with t1 as(select _accountid,cast(_time astimestamp)as _time,datefrom register wheredate>='2021-03-30'anddate<='2021-03-31'),
t2 as(select _accountid,cast(_time astimestamp)as _time,datefrom guidance wheredate>='2021-03-30'anddate<='2021-03-31'),
t3 as(select _accountid,cast(_time astimestamp)as _time,datefrom recharge wheredate>='2021-03-30'anddate<='2021-03-31'),
t4 as(select _accountid,cast(_time astimestamp)as _time,datefrom logout wheredate>='2021-03-30'anddate<='2021-03-31')select t1.date,count(distinct t1._accountid) step1,count(distinct t2._accountid) step2,count(distinct t3._accountid) step3,count(distinct t4._accountid) step4
from t1
leftjoin t2 on t1._accountid=t2._accountid and t1._time<t2._time and date_diff('second',t1._time,t2._time)<86400leftjoin t3 on t2._accountid=t3._accountid and t2._time<t3._time and date_diff('second',t1._time,t3._time)<86400leftjoin t4 on t3._accountid=t4._accountid and t3._time<t4._time and date_diff('second',t1._time,t4._time)<86400GROUPBY t1.date