select * from data where sn='thermostat0' and pq='ip' order by id desc limit 4
idsntspqvaluesystemts
21718718 thermostat0 ip 192.168.2.126 1561534863 Wed 26 06 2019 09:41:03
21718703 thermostat0 ip 192.168.2.126 1561534834 Wed 26 06 2019 09:40:34
21718693 thermostat0 ip 192.168.2.126 1561534806 Wed 26 06 2019 09:40:06
21718664 thermostat0 ip 192.168.2.126 1561534778 Wed 26 06 2019 09:39:38

Wed Jun 26 09:41:04 2019 by walley