select * from data where sn='thermostat0' and pq='ip' order by id desc limit 4
idsntspqvaluesystemts
27201019 thermostat0 ip 192.168.2.126 1571623587 Mon 21 10 2019 04:06:27
27201013 thermostat0 ip 192.168.2.126 1571623559 Mon 21 10 2019 04:05:59
27201004 thermostat0 ip 192.168.2.126 1571623530 Mon 21 10 2019 04:05:30
27200998 thermostat0 ip 192.168.2.126 1571623502 Mon 21 10 2019 04:05:02

Mon Oct 21 04:06:45 2019 by walley