在派生表上进行自定义计数
我有一个事件表。上面的屏幕快照显示了事件表的派生结果。它基本上显示了用户在一周内发射的“ X”事件的总数。
我的业务逻辑说,如果用户在一周内发射超过5个活动,那么他在那一周是活跃的用户。如果用户在2周内活跃,那么他是忠实的用户。
我想在一周和忠实用户数量之间绘制图形(过去2周活跃的用户)。我被困在这张衍生的桌子上。请帮忙!
I have an events table. The above screenshot show a derived result from events table. It basically shows total number of 'x' event fired by a user in a week.
My business logic says, if a user fires more than 5 events in a week then he is an active user in that week. If a user is active in 2 weeks, then he is loyal user.
I want to plot a graph between week and number of loyal users (users who have been active in 2 weeks in past). I am stuck at this derive table. Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里要考虑的方法是:
,所以
要让所有具有至少2个活跃周的员工就是这样
The approach I would consider here is:
So something like
To then get all Employees having atleast 2 active weeks is like this