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