雪花的客户保留率
我有这个用于客户保留率的
公式过去购买的客户[不包括最近30天]
I have this formula for the customer retention rate but kinda stuck in translating it into a sql code in snowflake:
Customer Retention rate: number of customers who purchased in the past AND in the period of [last 30 days] / number of customers who have purchased in the past [not including last 30 days]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我们检查每个客户是否有“旧销售”和“新销售
得到
我们想将两者都视为顶部的true,而trop/false to the the the the,我们可以使用:
并获取:
因此,使用
data_table
作为我们可以使用的来源:获得魔术50%
if we check for each customer if they have "old sales" and "new sales"
we get:
we then want to count both as true for the top, and trop/false for the bottom, we can use:
and get:
thus with a
data_table
as our source we can use:to get the magic 50%