In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Statistics on the distribution of game duration (minutes, number of people) when registered characters are recharged for the first time in September. Unit: minutes.
SELECT sub.minutes, Count (roleId) AS countFROM (SELECT pr.roleId, Timestampdiff (MINUTE, Max (player_login.logTime), pr.logTime) + Ifnull (Max (player_logout.totalOnlineMins), 0) AS minutes FROM (SELECT logTime, roleId FROM player_recharge WHERE createTime > = '2017-09-01' AND createTime
< '2017-10-01' AND rechargeTimes = 1) AS pr LEFT JOIN player_logout ON player_logout.roleId = pr.roleId LEFT JOIN player_login ON player_login.roleId = pr.roleId WHERE player_logout.logTime < pr.logTime AND player_login.logTime < pr.logTime GROUP BY pr.roleId) AS subWHERE sub.minutes >0GROUP BY sub.minutes
2. Group by day, check the top 10 ranks of daily payment in September (date, payment amount, ranking, role ID)
SELECT date AS 'date', pay AS' pay', rank, roleId FROM (SELECT zl_tmp.roleId, zl_tmp.date, zl_tmp.pay, @ rownum: = @ rownum + 1, IF (@ date = zl_tmp.date, @ rank: = @ rank + 1, @ rank: = 1) AS 'rank' Date: = zl_tmp.date FROM (SELECT roleId, SUM (cash) AS 'pay', DATE_FORMAT (logTime,'% Ymuri% MMI% d') AS 'date' FROM player_recharge WHERE logTime > =' 2017-09-01 'AND logTime
< '2017-10-01' GROUP BY date, roleId ORDER BY date, pay DESC ) zl_tmp, ( SELECT @rownum := 0, @date := NULL, @rank := 0 ) a ) result HAVING rank = '2017-09-01' AND logTime < '2017-10-01' GROUP BY date ) AS pl LEFT JOIN ( SELECT Date_format(logTime, '%Y-%m-%d') AS date, Count(DISTINCT roleId) AS prCount FROM player_recharge WHERE logTime >= '2017-09-01' AND logTime < '2017-10-01' GROUP BY date) AS pr ON pl.date = pr.date
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.