TDengine/tests/examples/bash/demo.sql

15 lines
545 B
MySQL
Raw Normal View History

2019-07-22 10:55:23 +00:00
create database if not exists db0
2019-08-05 02:41:28 +00:00
create table if not exists db0.tb0 (ts timestamp, voltage int, current float)
2019-07-22 10:55:23 +00:00
import into db0.tb0 file demo.csv
2019-08-05 02:41:28 +00:00
2019-07-22 10:55:23 +00:00
create database if not exists db1
use db1
2019-08-05 02:41:28 +00:00
create table if not exists tb1 (ts timestamp, temperature int, humidity float)
insert into tb1 values('2010-07-23 11:01:02.000', 37, 50.1)
insert into tb1 values(now, 36, 47.8);
insert into tb1 values(now+1a, 38, 65.3);
insert into tb1 values(now+1s, 38, 53.9 );
insert into tb1 values(now+1m, 37, 45.6);
insert into tb1 values(now+1h, 35, 41.1);