I am working on a project using TDengine, and the recent work requires to perform some subquery. I was experimenting with TDengine subquery, and encountered the following problems
taos> select avg(col2) from stb where col1 > (select avg(col1) from stb);
DB error: syntax error near "select avg(col1) from stb);" (0.000149s)
taos> select avg(col2), (select last(ts) from stb_54) as ts_spec from stb;
DB error: syntax error near "select last(ts) from stb_54) as ts_spec from (0.000092s)
taos>select max(col3) from (select spread(col3) as col3 from stbgroup by tbname);
Segmentation fault (core dumped)
Does TDengine supports subquery? Is there a syntax I need to follow?