timestamp_read timestamp entity_id status now_in
10/26/16 15:31 1477495880 1758 0 36 West
11/1/16 19:08 1478027336 1758 0 36 West
11/28/16 19:42 1480362171 1758 0 36 West
12/17/16 16:50 1481993441 1758 0 36 West
1/10/17 21:17 1484083045 1758 1 36 West
11/18/16 19:56 1479499012 1841 0 Service
12/7/16 16:33 1481128427 1841 0 Attention
11/4/16 15:05 1478271946 1902 0 36 West
11/28/16 16:47 1480351626 1902 0 36 West
12/16/16 23:49 1481932191 1902 0 36 West
1/10/17 21:32 1484083954 1902 1 36 West
11/1/16 18:54 1478026491 1904 0 36 West
11/28/16 17:28 1480354089 1904 0 36 West
12/17/16 18:09 1481998170 1904 0 36 West
12/21/16 14:53 1482332016 1904 0 55 West
1/6/17 19:34 1483731252 1904 0 Show
1/11/17 16:01 1484150479 1904 0 55 West
1/17/17 17:31 1484674280 1904 1 36 West
我必须审核LOG而不是最好的设计表。
我需要列'实体'的最新记录。基于unixtime列' timestamp'
非常感谢任何帮助
答案 0 :(得分:0)
select * from scan_log order by timestamp desc limit 1
这就是你想要的吗?你还没有描述任何外键或关系。