时间:2021-07-01 10:21:17 帮助过:3人阅读
Query abstract:
SELECT user_id,COUNT(id) AS num,MAX(login_time) AS last_login_time FROM tab_user_login_record WHERE login_time BETWEEN N AND N GROUP BY user_id;
Query sample:
SELECT `user_id`,COUNT(id) AS num,MAX(login_time) AS last_login_time FROM `tab_user_login_record` WHERE `login_time` BETWEEN 1501862400 AND 1503158399 GROUP BY user_id;
本文出自 “10931853” 博客,请务必保留此出处http://wujianwei.blog.51cto.com/10931853/1964987
mysql5.6.20开启慢查询日志以及创建索引优化慢查询
标签:开启 mysql 查询日志