fix:iot首页统计中存在的TDengine中的SQL特异性问题:在TDengine中,GROUP BY子句不能直接使用别名。在你的SQL中,你先使用TIMETRUNCATE(ts, 1h) AS time定义了一个别名time,然后在GROUP BY time中使用了这个别名,这在TDengine中是不允许的。
This commit is contained in:
parent
a17d4bb281
commit
b339801963
@ -103,7 +103,7 @@
|
|||||||
AND ts <= #{endTime}
|
AND ts <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
GROUP BY time
|
GROUP BY TIMETRUNCATE(ts, 1h)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user