From 3313604e55922515b4c0b658bda313c09ad7d99b Mon Sep 17 00:00:00 2001 From: wade zhang <95411902+gccgdb1234@users.noreply.github.com> Date: Thu, 28 Apr 2022 12:28:33 +0800 Subject: [PATCH] Update 06-subscribe.mdx --- docs-cn/04-develop/06-subscribe.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs-cn/04-develop/06-subscribe.mdx b/docs-cn/04-develop/06-subscribe.mdx index bf5b2c138e..4a5b2d2832 100644 --- a/docs-cn/04-develop/06-subscribe.mdx +++ b/docs-cn/04-develop/06-subscribe.mdx @@ -177,19 +177,19 @@ $ taos ### 准备数据 ```sql -# 创建 power 库 +# create database "power" taos> create database power; -# 切换库 +# use "power" as the database in following operations taos> use power; -# 创建超级表 +# create super table "meters" taos> create table meters(ts timestamp, current float, voltage int, phase int) tags(location binary(64), groupId int); -# 创建表 +# create tabes using the schema defined by super table "meters" taos> create table d1001 using meters tags ("Beijing.Chaoyang", 2); taos> create table d1002 using meters tags ("Beijing.Haidian", 2); -# 插入测试数据 +# insert some rows taos> insert into d1001 values("2020-08-15 12:00:00.000", 12, 220, 1),("2020-08-15 12:10:00.000", 12.3, 220, 2),("2020-08-15 12:20:00.000", 12.2, 220, 1); taos> insert into d1002 values("2020-08-15 12:00:00.000", 9.9, 220, 1),("2020-08-15 12:10:00.000", 10.3, 220, 1),("2020-08-15 12:20:00.000", 11.2, 220, 1); -# 从超级表 meters 查询电流大于 10A 的记录 +# filter out the rows in which current is bigger than 10A taos> select * from meters where current > 10; ts | current | voltage | phase | location | groupid | =========================================================================================================== -- GitLab