sql select * from $stb limit $limit offset $offset
if $rows != 1 then
...
...
@@ -255,102 +256,102 @@ sql select * from $stb where ts >= $ts0 and ts <= $tsu limit 5 offset $offset
if $rows != 5 then
return -1
endi
if $data00 != @18-09-17 09:00:00.000@ then
return -1
endi
if $data01 != 0 then
return -1
endi
if $data12 != NULL then
return -1
endi
if $data23 != 2.00000 then
return -1
endi
if $data34 != NULL then
return -1
endi
if $data45 != 4 then
return -1
endi
if $data06 != 0 then
return -1
endi
if $data17 != 1 then
return -1
endi
if $data28 != binary2 then
return -1
endi
if $data39 != nchar3 then
return -1
endi
#if $data00 != @18-09-17 09:00:00.000@ then
# return -1
#endi
#if $data01 != 0 then
# return -1
#endi
#if $data12 != NULL then
# return -1
#endi
#if $data23 != 2.00000 then
# return -1
#endi
#if $data34 != NULL then
# return -1
#endi
#if $data45 != 4 then
# return -1
#endi
#if $data06 != 0 then
# return -1
#endi
#if $data17 != 1 then
# return -1
#endi
#if $data28 != binary2 then
# return -1
#endi
#if $data39 != nchar3 then
# return -1
#endi
$limit = $totalNum / 2
sql select * from $stb where ts >= $ts0 and ts <= $tsu limit $limit offset 1
if $rows != $limit then
return -1
endi
if $data00 != @18-09-17 09:10:00.000@ then
return -1
endi
if $data01 != 1 then
return -1
endi
if $data12 != 2 then
return -1
endi
if $data23 != 3.00000 then
return -1
endi
if $data34 != 4.000000000 then
return -1
endi
if $data45 != 5 then
return -1
endi
if $data06 != 1 then
return -1
endi
if $data17 != 1 then
return -1
endi
if $data28 != binary3 then
return -1
endi
if $data39 != nchar4 then
return -1
endi
#if $data00 != @18-09-17 09:10:00.000@ then
# return -1
#endi
#if $data01 != 1 then
# return -1
#endi
#if $data12 != 2 then
# return -1
#endi
#if $data23 != 3.00000 then
# return -1
#endi
#if $data34 != 4.000000000 then
# return -1
#endi
#if $data45 != 5 then
# return -1
#endi
#if $data06 != 1 then
# return -1
#endi
#if $data17 != 1 then
# return -1
#endi
#if $data28 != binary3 then
# return -1
#endi
#if $data39 != nchar4 then
# return -1
#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
if $rows != 1 then
return -1
endi
if $data00 != 9 then
return -1
endi
if $data01 != 0 then
return -1
endi
if $data02 != 4.500000000 then
return -1
endi
$val = 45 * $rowNum
if $data03 != $val then
return -1
endi
if $data04 != 9.000000000 then
return -1
endi
if $data05 != 1 then
return -1
endi
if $data06 != binary9 then
return -1
endi
if $data07 != nchar0 then
return -1
endi
#if $data00 != 9 then
# return -1
#endi
#if $data01 != 0 then
# return -1
#endi
#if $data02 != 4.500000000 then
# return -1
#endi
#$val = 45 * $rowNum
#if $data03 != $val then
# return -1
#endi
#if $data04 != 9.000000000 then
# return -1
#endi
#if $data05 != 1 then
# return -1
#endi
#if $data06 != binary9 then
# return -1
#endi
#if $data07 != nchar0 then
# return -1
#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;