I'm trying to create a stream in TDengine.
The following statement is ok:
Select count(*),first(_ts),last_row(_ts),_value,devicecode from yxzt partiton by devicecode state_window(_value);
However, when I change the statement to the following sql, it reports an error.
Select count(*),first(_ts),last_row(_ts),_value,devicecode from yxzt partiton by rename state_window(_value);
No valid function in window query
devicecode
is a tag I defined.
I need the "partition by tbname" sub-clause to create the stream, but I don't know why the clause failed.