select t.sn,h.* from tms_heart_beat h inner join tms_terminal t on h.terminal_id=t.id order by h.create_ts desc