这个是回头人数
select a.fdate as actfdate, b.fdate as backfdate, count(a.uid) as backCnt from
(SELECT fdate, uid from table where fdate >= startA and fdate < endA) as a,
(SELECT fdate, uid from table where fdate >= startB and fdate < endB) as b
where a.uid = b.uid and a.fdate < b. fdate group by actfdate, backfdate
这是当天活跃
select fdate, count(uid) as actCnt from table where fdate >= startA and fdate < endA group by fdate