mysql 获取分组后 最早/最后的 第一条数据
时间:2020-07-22 12:13:38
收藏:0
阅读:1205
【问题】 获取用户最后一次记录的 坐标记录
表记录截图:
【解决】
select max.*, MAX(max.createTime) createMax
From (select `autoID`, `openID`, `longitude`, `latitude`, `street`, `createtime` from t_userlocation_log order by createTime desc limit 100 ) max
group by openId
原文:https://www.cnblogs.com/grayhuang/p/13359548.html
评论(0)