TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

Can Boolean data achieve aggregate analysis?

Open xujin-wk opened this issue 6 years ago • 3 comments

在建表时,有一个value字段定义为bool型,往表里写入数据时,value字段默认存储true或false,TDengine支持设置存储0或1吗?或者说,TDengine sql中有没有关键字可以实现支持对bool型字段做avg,sum等聚合分析?

xujin-wk avatar Aug 27 '20 01:08 xujin-wk

我尝试对bool类型字段求平均: select avg(value) from train_signal where v_id=7500 and ts>1598313600000 and ts <1598486400000; sql执行报错: invalid SQL: not support column types

xujin-wk avatar Aug 27 '20 01:08 xujin-wk

bool 类型为何要计算平均数呢?

hjxilinx avatar Aug 28 '20 05:08 hjxilinx

This issue was closed because it has been inactive for too many days.

hjxilinx avatar May 04 '22 06:05 hjxilinx