Select command how to sort to have the 2 newest dataset

Hello
with influx1.8 i have a select command

select bytes_recv, bytes_sent, interface, packets_recv, packets_sent from “net” WHERE “interface” = ‘igb0’
basically it works BUT with limit 2 i always get the same value
adding a AND time > now() -5 the value change

is the a way to just get the limit 2 but with newest value first? or it is the correct way with time command?

have a nice day
vinc

Hi @vikozo,
You could perhaps you could use order to achieve this

select bytes_recv, bytes_sent, interface, packets_recv, packets_sent from “net” WHERE “interface” = ‘igb0’ ORDER BY time DESC LIMIT 2