0

I created a stable and a few sub-tables, then I used below SQL to list all records, but the result is not ordered by ts column. any way to do it?

select * from stable1

2 Answers2

0

You can use order by to order your retrieved data.

select * from table order by ts;

example pic

For more infomation about order by you can refer search order by

xiaolei
  • 43
  • 1
  • 6
0

You can use order by in a TDengine query sql statement, for example to sort a stable by ts column with descending order.

select * from log.dnodes_info order by ts desc
zitsen
  • 339
  • 2
  • 10