首页 > 解决方案 > TDengine的两个超级表join查询错误

问题描述

我想加入查询TDengine数据库的两个超级表。

超级表的模式在这里: s1 (ts timestamp, v int) tags (t bindary(64)) s2 (ts timestamp, v int) tags (t bindary(64))

taos> select * from s1, s2 and s1.ts = s2.ts

DB error: invalid SQL: super table join requires tags column

taos> select * from s1, s2 and s1.ts = s2.ts where s1.tag = s2.tag and s1.ts = s2.ts

DB error: syntax error near "tag = s2.tag;" 

有人可以帮我指出我该怎么做吗?

标签: sqltime-seriestd-engine

解决方案


推荐阅读