在TDengine中如何分组求和后再排序? #5586
limuzi2231
started this conversation in
General
Replies: 1 comment
-
目前不支持对时间戳以外的普通列排序 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
假设我这边有sip, dip, up_cnt, down_cnt, sum_cnt,我这边再对这一组数据根据sip分组,然后对sum_cnt求和后,对输出的数据进行降序排列,在mysql里直接执行select * from (select sip, sum(sum_cnt) as total from table_1 group by sip) tmp_1 order by tmp_1.total desc;即可得到结果,但在tdengine库中执行时,会直接报段错误,请问如何书写这种语句呢?
Beta Was this translation helpful? Give feedback.
All reactions