In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to check users who have not logged on to the system for two consecutive days in the database". The content is easy to understand and clear, hoping to help you solve your doubts. Let the editor lead you to study and learn the article "how to check users who have not logged in the system for two consecutive days in the database".
The idea of writing sql:
1: find a way to write two adjacent logins to the same line (1) oder by id,sign_tim (2) row_number () over (partition by id order by sign_tim) rank # # remove the last record of each user (3) create a list of lead (time) over (order by rownum) # # list the records of the next row in the same column 2: two Date type fields: START_DATE,END_DATE Calculate the time difference between these two dates ROUND (TO_NUMBER (END_DATE-START_DATE)) defaults to day ROUND (TO_NUMBER (END_DATE-START_DATE) * 24) change hour 3: filter out the records with an interval of more than 2 days case when jiange > 2 then'> 2 daytime 'else' end as jieguo is all the contents of this article "how to check users who have not logged on to the system for two consecutive days in the database". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.