根据设备id,门编号,查操作日志,hash去重,按时间倒序,第0页,20条

* and d.5f76a6077267452a9cc2b43a1e255bc6 and door.0 not act.online not act.offline | select hash, arbitrary(content), arbitrary(time) from log group by hash order by arbitrary(time) desc limit 0,20

优先以下写法

/* and d.bc806cfa95934a2186c349a01cdee6e9 and door.0 not act.online not act.offline | select distinct hash,content,time from log order by time desc limit 0,10

对应计数语句

* and d.5f76a6077267452a9cc2b43a1e255bc6 and door.0 not act.online not act.offline | select count(distinct hash)

作者:一叶火  创建时间:2024-01-15 17:18
最后编辑:一叶火  更新时间:2024-12-25 15:33