什么是超级表 事例中的where条件字段写错了,name应该改为location
This commit is contained in:
parent
7e52ceba89
commit
e7f473fcf4
|
@ -218,7 +218,7 @@ GROUP BY location, type
|
||||||
```mysql
|
```mysql
|
||||||
SELECT COUNT(*), AVG(degree), MAX(degree), MIN(degree)
|
SELECT COUNT(*), AVG(degree), MAX(degree), MIN(degree)
|
||||||
FROM thermometer
|
FROM thermometer
|
||||||
WHERE name<>'beijing' and ts>=now-1d
|
WHERE location<>'beijing' and ts>=now-1d
|
||||||
INTERVAL(10M)
|
INTERVAL(10M)
|
||||||
GROUP BY location, type
|
GROUP BY location, type
|
||||||
```
|
```
|
||||||
|
|
|
@ -102,7 +102,7 @@ List the number of records, average, maximum, and minimum temperature every 10 m
|
||||||
```mysql
|
```mysql
|
||||||
SELECT COUNT(*), AVG(degree), MAX(degree), MIN(degree)
|
SELECT COUNT(*), AVG(degree), MAX(degree), MIN(degree)
|
||||||
FROM thermometer
|
FROM thermometer
|
||||||
WHERE name='beijing' and type=10 and ts>=now-1d
|
WHERE location='beijing' and type=10 and ts>=now-1d
|
||||||
INTERVAL(10M)
|
INTERVAL(10M)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue