TDengine
TDengine copied to clipboard
Please support case when and arithmetic operator in TDengine SQL
目前的sql语法,过于简陋,在实际的业务场景中,会很容易受到限制。 场景举例: select code ,sum(1) as cnt ,sum(case when side='buy' then 1 end) as buy_cnt ,sum(value1 + value2) as value from trade_log group by code
这个SQL语法非常常见,也非常实用。 目前缺乏这方面的支持,需要自行在程序中做预处理,应用程序的复杂度急剧提升
请稍等。 我们在后续的版本中会提供 case when 的支持。
Does tdengine support sum(value1 * value2)
in SQL at the moment?
Does tdengine support case-when sql syntax for v3.0.0?
3.x has already support case-when
2.x 版本目前官方已经不维护支持了,请迁移升级到最新的 3.x 版本吧。操作手册为:https://www.taosdata.com/tdengine-engineering/17753.html。3.x 和 2.x 相比是全方位更加优越的,关于3.x 的主要特性可以结合这篇文章和官方文档一起了解:https://www.taosdata.com/tdengine-engineering/21550.html