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 use mysql to calculate the maximum unlogged-in period for users this year

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Editor to share with you how to use mysql to calculate the maximum unlogged-in period of users this year, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's learn about it!

Calculate the maximum period during which users are not logged in this year

Space_user_task_statistics_log if the user has logged in, the information is recorded in the table

The main information includes user ID and login time.

Space_user records the basic information of users. It mainly includes user ID and registration time information.

Demand:

Check the largest unlogged-in period for all users in 2017

If the user registers only in 2017, the valid time starts from the registration time.

In fact, this is a problem of MySQL computing continuous range.

SQL

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