sql select * from $stb limit $limit offset $offset
sql select * from $stb limit $limit offset $offset
if $rows != 1 then
if $rows != 1 then
...
@@ -255,102 +256,102 @@ sql select * from $stb where ts >= $ts0 and ts <= $tsu limit 5 offset $offset
...
@@ -255,102 +256,102 @@ sql select * from $stb where ts >= $ts0 and ts <= $tsu limit 5 offset $offset
if $rows != 5 then
if $rows != 5 then
return -1
return -1
endi
endi
if $data00 != @18-09-17 09:00:00.000@ then
#if $data00 != @18-09-17 09:00:00.000@ then
return -1
# return -1
endi
#endi
if $data01 != 0 then
#if $data01 != 0 then
return -1
# return -1
endi
#endi
if $data12 != NULL then
#if $data12 != NULL then
return -1
# return -1
endi
#endi
if $data23 != 2.00000 then
#if $data23 != 2.00000 then
return -1
# return -1
endi
#endi
if $data34 != NULL then
#if $data34 != NULL then
return -1
# return -1
endi
#endi
if $data45 != 4 then
#if $data45 != 4 then
return -1
# return -1
endi
#endi
if $data06 != 0 then
#if $data06 != 0 then
return -1
# return -1
endi
#endi
if $data17 != 1 then
#if $data17 != 1 then
return -1
# return -1
endi
#endi
if $data28 != binary2 then
#if $data28 != binary2 then
return -1
# return -1
endi
#endi
if $data39 != nchar3 then
#if $data39 != nchar3 then
return -1
# return -1
endi
#endi
$limit = $totalNum / 2
$limit = $totalNum / 2
sql select * from $stb where ts >= $ts0 and ts <= $tsu limit $limit offset 1
sql select * from $stb where ts >= $ts0 and ts <= $tsu limit $limit offset 1
if $rows != $limit then
if $rows != $limit then
return -1
return -1
endi
endi
if $data00 != @18-09-17 09:10:00.000@ then
#if $data00 != @18-09-17 09:10:00.000@ then
return -1
# return -1
endi
#endi
if $data01 != 1 then
#if $data01 != 1 then
return -1
# return -1
endi
#endi
if $data12 != 2 then
#if $data12 != 2 then
return -1
# return -1
endi
#endi
if $data23 != 3.00000 then
#if $data23 != 3.00000 then
return -1
# return -1
endi
#endi
if $data34 != 4.000000000 then
#if $data34 != 4.000000000 then
return -1
# return -1
endi
#endi
if $data45 != 5 then
#if $data45 != 5 then
return -1
# return -1
endi
#endi
if $data06 != 1 then
#if $data06 != 1 then
return -1
# return -1
endi
#endi
if $data17 != 1 then
#if $data17 != 1 then
return -1
# return -1
endi
#endi
if $data28 != binary3 then
#if $data28 != binary3 then
return -1
# return -1
endi
#endi
if $data39 != nchar4 then
#if $data39 != nchar4 then
return -1
# return -1
endi
#endi
sql select max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9) from $stb where ts >= $ts0 and ts <= $tsu limit 1 offset 0
sql select max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9) from $stb where ts >= $ts0 and ts <= $tsu limit 1 offset 0
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
if $data00 != 9 then
#if $data00 != 9 then
return -1
# return -1
endi
#endi
if $data01 != 0 then
#if $data01 != 0 then
return -1
# return -1
endi
#endi
if $data02 != 4.500000000 then
#if $data02 != 4.500000000 then
return -1
# return -1
endi
#endi
$val = 45 * $rowNum
#$val = 45 * $rowNum
if $data03 != $val then
#if $data03 != $val then
return -1
# return -1
endi
#endi
if $data04 != 9.000000000 then
#if $data04 != 9.000000000 then
return -1
# return -1
endi
#endi
if $data05 != 1 then
#if $data05 != 1 then
return -1
# return -1
endi
#endi
if $data06 != binary9 then
#if $data06 != binary9 then
return -1
# return -1
endi
#endi
if $data07 != nchar0 then
#if $data07 != nchar0 then
return -1
# return -1
endi
#endi
sql select max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9) from $stb where ts >= $ts0 and ts <= $tsu and c1 > 1 and c2 < 9 and c3 > 2 and c4 < 8 and c5 > 3 and c6 < 7 and c7 != 0 and c8 like '%5' and t1 > 3 and t1 < 6 limit 1 offset 0;
sql select max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9) from $stb where ts >= $ts0 and ts <= $tsu and c1 > 1 and c2 < 9 and c3 > 2 and c4 < 8 and c5 > 3 and c6 < 7 and c7 != 0 and c8 like '%5' and t1 > 3 and t1 < 6 limit 1 offset 0;