数据库去重

来源:互联网 发布:js多个异步请求结果 编辑:程序博客网 时间:2024/04/27 13:53
 SELECT * FROM (SELECT * FROM (SELECT * FROM `tbl_event` ORDER BY `event_time` DESC) `temp`  GROUP BY device_name ORDER BY `event_time` DESC)temp1 WHERE already_revent =1
白彪  11:21:04
ok
维她命  11:21:05
那未复归的就这样写吧
白彪  11:21:22
好的 

维她命  11:21:25
我改了两个报警试了下
正常
白彪  11:26:05
SELECT id, type, event_time AS createdate , device_name AS cloum ,description,value  FROM (SELECT * FROM (SELECT * FROM `tbl_event` ORDER BY `event_time` DESC) `temp`  GROUP BY device_name ORDER BY `event_time` DESC)temp1 WHERE already_revent =1
原创粉丝点击