java - mongodb 数据统计(留存率) 应该怎么实现?
巴扎黑
巴扎黑 2017-04-17 13:13:09
0
2
517
巴扎黑
巴扎黑

reply all(2)
黄舟

http://docs.mongodb.org/manual/aggregation/

大家讲道理

Design like this:

{
    player: {
        id: 123,
        name: 'zhangsan',
        register_time: 
    },
    login_time: 
}

Then aggregate
First filter by register_time, then group by login_time

I guess you still don’t know how to...

Also, I think, don’t do this, it requires a lot of calculations

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template