什么是超级表 事例中的where条件字段写错了,name应该改为location

This commit is contained in:
malong 2019-11-20 13:44:26 +08:00
parent 7e52ceba89
commit e7f473fcf4
2 changed files with 2 additions and 2 deletions

View File

@ -218,7 +218,7 @@ GROUP BY location, type
```mysql
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
```

View File

@ -102,7 +102,7 @@ List the number of records, average, maximum, and minimum temperature every 10 m
```mysql
SELECT COUNT(*), AVG(degree), MAX(degree), MIN(degree)
FROM thermometer
WHERE name='beijing' and type=10 and ts>=now-1d
WHERE location='beijing' and type=10 and ts>=now-1d
INTERVAL(10M)
```