From 5a09ffebb9bd446cf1f15eda6d8fc0b12afe0556 Mon Sep 17 00:00:00 2001 From: malong Date: Fri, 15 Nov 2019 15:06:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E6=97=B6=E9=97=B4=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E8=81=9A=E5=90=88=E6=9F=A5=E8=AF=A2=20=E4=B8=AD=20WHERE?= =?UTF-8?q?=E5=90=8E=E9=9D=A2=E7=9A=84name=20=E6=94=B9=E4=B8=BA=20location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- documentation/tdenginedocs-cn/super-table/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/tdenginedocs-cn/super-table/index.html b/documentation/tdenginedocs-cn/super-table/index.html index 5ee9587b2f..3d2681990a 100644 --- a/documentation/tdenginedocs-cn/super-table/index.html +++ b/documentation/tdenginedocs-cn/super-table/index.html @@ -105,6 +105,6 @@ GROUP BY location, type

查询仅位于北京以外地区的温度传感器最近24小时(24h)采样值的数量count(*)、平均温度avg(degree)、最高温度max(degree)和最低温度min(degree),将采集结果按照10分钟为周期进行聚合,并将结果按所处地域(location)和传感器类型(type)再次进行聚合。

SELECT COUNT(*), AVG(degree), MAX(degree), MIN(degree)
 FROM thermometer
-WHERE name<>'beijing' and ts>=now-1d
+WHERE location<>'beijing' and ts>=now-1d
 INTERVAL(10M)
 GROUP BY location, type
回去 -- GitLab