Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to count the retention rate in mysql

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to count the retention rate in mysql. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

Sql code

Begin

Declare i int

Declare numareaId int (10)

Declare currentareaId int (10)

SELECT COUNT (areaId), MIN (areaId) INTO @ a

SET numareaId=@a

SET currentareaId=@b

Loop1:WHILE numareaId > 0 DO

SET @ AID = currentareaId

SET iTunes 1

While i=date_sub (curdate (), interval i day) and createTime=date_add (date_sub (curdate (), interval i day), interval 1 day) and loginTime=date_sub (curdate (), interval i day) and createTime=date_add (date_sub (curdate (), interval i day), interval 2 day) and loginTime=date_sub (curdate (), interval i day) and createTime=date_add (date_sub (curdate (), interval i day), interval 3 day) and loginTime=date_sub (curdate () Interval i day) and createTime=date_add (date_sub (curdate (), interval i day), interval 4 day) and loginTime=date_sub (curdate (), interval i day) and createTime=date_add (date_sub (curdate (), interval i day), interval 5 day) and loginTime=date_sub (curdate (), interval i day) and createTime=date_add (date_sub (curdate (), interval i day), interval 6 day) and loginTime=date_sub (curdate (), interval i day) and createTime=date_add (date_sub (curdate (), interval i day) Interval 7 day) and loginTime=date_sub (curdate (), interval i day) and createTime

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report