sql select max(c2), min(c2), avg(c2), count(c2), sum(c2), spread(c2), first(c2), last(c2) from $stb where ts >= $ts0 and ts <= $tsu and t1 > 3 and t1 < 6 interval(5m) group by t1 order by t1 desc limit 3 offset 1
if $rows != 3 then
return -1
endi
if $data00 != @18-09-17 09:20:00.000@ then
return -1
endi
if $data01 != 2 then
return -1
endi
if $data02 != 2 then
return -1
endi
if $data09 != 4 then
return -1
endi
if $data13 != 3.000000000 then
return -1
endi
if $data19 != 4 then
return -1
endi
if $data20 != @18-09-17 09:40:00.000@ then
return -1
endi
if $data24 != 1 then
return -1
endi
if $data25 != 4 then
return -1
endi
if $data26 != 0.000000000 then
return -1
endi
if $data27 != 4 then
return -1
endi
if $data28 != 4 then
return -1
endi
if $data29 != 4 then
return -1
endi
#sql select max(c2), min(c2), avg(c2), count(c2), sum(c2), spread(c2), first(c2), last(c2) from $stb where ts >= $ts0 and ts <= $tsu and t1 > 3 and t1 < 6 interval(5m) group by t1 order by t1 desc limit 3 offset 1
#if $rows != 3 then
# return -1
#endi
#if $data00 != @18-09-17 09:20:00.000@ then
# return -1
#endi
#if $data01 != 2 then
# return -1
#endi
#if $data02 != 2 then
# return -1
#endi
#if $data09 != 4 then
# return -1
#endi
#if $data13 != 3.000000000 then
# return -1
#endi
#if $data19 != 4 then
# return -1
#endi
#if $data20 != @18-09-17 09:40:00.000@ then
# return -1
#endi
#if $data24 != 1 then
# return -1
#endi
#if $data25 != 4 then
# return -1
#endi
#if $data26 != 0.000000000 then
# return -1
#endi
#if $data27 != 4 then
# return -1
#endi
#if $data28 != 4 then
# return -1
#endi
#if $data29 != 4 then
# return -1
#endi
sql select max(c2), min(c2), avg(c2), count(c2), spread(c2), first(c2), last(c2), count(ts) from $stb where ts >= $ts0 and ts <= $tsu and t1 > 3 and t1 < 6 interval(5m) group by t1 order by t1 desc limit 3 offset 1