print ====> select count(*) from (select * from dev_001) session(ts,5a)
sql select count(*) from (select * from dev_001) session(ts,5a)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,5a)
if $rows != 15 then
return -1
endi
...
...
@@ -109,7 +109,7 @@ if $data01 != 2 then
endi
print ====> select count(*) from dev_001 session(ts,1s)
sql select count(*) from dev_001 session(ts,1s)
sql select _wstartts, count(*) from dev_001 session(ts,1s)
if $rows != 12 then
return -1
endi
...
...
@@ -118,7 +118,7 @@ if $data01 != 5 then
endi
print ====> select count(*) from (select * from dev_001) session(ts,1s)
sql select count(*) from (select * from dev_001) session(ts,1s)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,1s)
if $rows != 12 then
return -1
endi
...
...
@@ -127,7 +127,7 @@ if $data01 != 5 then
endi
print ====> select count(*) from dev_001 session(ts,1000a)
sql select count(*) from dev_001 session(ts,1000a)
sql select _wstartts, count(*) from dev_001 session(ts,1000a)
if $rows != 12 then
return -1
endi
...
...
@@ -136,7 +136,7 @@ if $data01 != 5 then
endi
print ====> select count(*) from (select * from dev_001) session(ts,1000a)
sql select count(*) from (select * from dev_001) session(ts,1000a)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,1000a)
if $rows != 12 then
return -1
endi
...
...
@@ -145,7 +145,7 @@ if $data01 != 5 then
endi
print ====> select count(*) from dev_001 session(ts,1m)
sql select count(*) from dev_001 session(ts,1m)
sql select _wstartts, count(*) from dev_001 session(ts,1m)
if $rows != 9 then
return -1
endi
...
...
@@ -154,7 +154,7 @@ if $data01 != 8 then
endi
print ====> select count(*) from (select * from dev_001) session(ts,1m)
sql select count(*) from (select * from dev_001) session(ts,1m)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,1m)
if $rows != 9 then
return -1
endi
...
...
@@ -163,7 +163,7 @@ if $data01 != 8 then
endi
print ====> select count(*) from dev_001 session(ts,1h)
sql select count(*) from dev_001 session(ts,1h)
sql select _wstartts, count(*) from dev_001 session(ts,1h)
if $rows != 6 then
return -1
endi
...
...
@@ -172,7 +172,7 @@ if $data01 != 11 then
endi
print ====> select count(*) from (select * from dev_001) session(ts,1h)
sql select count(*) from (select * from dev_001) session(ts,1h)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,1h)
if $rows != 6 then
return -1
endi
...
...
@@ -181,7 +181,7 @@ if $data01 != 11 then
endi
print ====> select count(*) from dev_001 session(ts,1d)
sql select count(*) from dev_001 session(ts,1d)
sql select _wstartts, count(*) from dev_001 session(ts,1d)
if $rows != 4 then
return -1
endi
...
...
@@ -190,7 +190,7 @@ if $data01 != 13 then
endi
print ====> select count(*) from (select * from dev_001) session(ts,1d)
sql select count(*) from (select * from dev_001) session(ts,1d)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,1d)
if $rows != 4 then
return -1
endi
...
...
@@ -199,7 +199,7 @@ if $data01 != 13 then
endi
print ====> select count(*) from dev_001 session(ts,1w)
sql select count(*) from dev_001 session(ts,1w)
sql select _wstartts, count(*) from dev_001 session(ts,1w)
if $rows != 2 then
return -1
endi
...
...
@@ -208,7 +208,7 @@ if $data01 != 15 then
endi
print ====> select count(*) from (select * from dev_001) session(ts,1w)
sql select count(*) from (select * from dev_001) session(ts,1w)
sql select _wstartts, count(*) from (select * from dev_001) session(ts,1w)
if $rows != 2 then
return -1
endi
...
...
@@ -216,71 +216,73 @@ if $data01 != 15 then
return -1
endi
print ====> leastsquares not supported yet.
print ====> select count(*),first(tagtype),last(tagtype),avg(tagtype),sum(tagtype),min(tagtype),max(tagtype),leastsquares(tagtype, 1, 1),spread(tagtype),stddev(tagtype),percentile(tagtype,0) from dev_001 where ts <'2020-05-20 0:0:0' session(ts,1d)
sql select count(*),first(tagtype),last(tagtype),avg(tagtype),sum(tagtype),min(tagtype),max(tagtype),leastsquares(tagtype, 1, 1),spread(tagtype),stddev(tagtype),percentile(tagtype,0) from dev_001 where ts <'2020-05-20 0:0:0' session(ts,1d)
if $rows != 2 then
return -1
endi
if $data01 != 13 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != 13 then
return -1
endi
if $data04 != 7 then
return -1
endi
if $data05 != 91 then
return -1
endi
if $data06 != 1 then
return -1
endi
if $data07 != 13 then
return -1
endi
if $data08 != @{slop:1.000000, intercept:0.000000}@ then
return -1
endi
if $data09 != 12 then
return -1
endi
#sql select count(*),first(tagtype),last(tagtype),avg(tagtype),sum(tagtype),min(tagtype),max(tagtype),leastsquares(tagtype, 1, 1),spread(tagtype),stddev(tagtype),percentile(tagtype,0) from dev_001 where ts <'2020-05-20 0:0:0' session(ts,1d)
#if $rows != 2 then
# return -1
#endi
#if $data01 != 13 then
# return -1
#endi
#if $data02 != 1 then
# return -1
#endi
#if $data03 != 13 then
# return -1
#endi
#if $data04 != 7 then
# return -1
#endi
#if $data05 != 91 then
# return -1
#endi
#if $data06 != 1 then
# return -1
#endi
#if $data07 != 13 then
# return -1
#endi
#if $data08 != @{slop:1.000000, intercept:0.000000}@ then
# return -1
#endi
#if $data09 != 12 then
# return -1
#endi
# $data0-10 != 3.741657387
# $data0-11 != 1
# $data1-11 != 14
print ====> select count(*),first(tagtype),last(tagtype),avg(tagtype),sum(tagtype),min(tagtype),max(tagtype),leastsquares(tagtype, 1, 1) from (select * from dev_001 where ts <'2020-05-20 0:0:0') session(ts,1d)
sql select count(*),first(tagtype),last(tagtype),avg(tagtype),sum(tagtype),min(tagtype),max(tagtype),leastsquares(tagtype, 1, 1) from (select * from dev_001 where ts <'2020-05-20 0:0:0') session(ts,1d)
if $rows != 2 then
return -1
endi
if $data01 != 13 then
return -1
endi
if $data02 != 1 then
return -1
endi
if $data03 != 13 then
return -1
endi
if $data04 != 7 then
return -1
endi
if $data05 != 91 then
return -1
endi
if $data06 != 1 then
return -1
endi
if $data07 != 13 then
return -1
endi
if $data08 != @{slop:1.000000, intercept:0.000000}@ then
return -1
endi
#sql select count(*),first(tagtype),last(tagtype),avg(tagtype),sum(tagtype),min(tagtype),max(tagtype),leastsquares(tagtype, 1, 1) from (select * from dev_001 where ts <'2020-05-20 0:0:0') session(ts,1d)
#if $rows != 2 then
# return -1
#endi
#if $data01 != 13 then
# return -1
#endi
#if $data02 != 1 then
# return -1
#endi
#if $data03 != 13 then
# return -1
#endi
#if $data04 != 7 then
# return -1
#endi
#if $data05 != 91 then
# return -1
#endi
#if $data06 != 1 then
# return -1
#endi
#if $data07 != 13 then
# return -1
#endi
#if $data08 != @{slop:1.000000, intercept:0.000000}@ then