#sql_error select max(c1) from $stb where ts >= $ts0 and ts <= $tsu slimit 5 limit 1
#sql_error select max(c1) from $stb where ts >= $ts0 and ts <= $tsu soffset 5
#sql_error select max(c1) from $stb where ts >= $ts0 and ts <= $tsu limit 5 soffset 1
#sql_error select max(c1) from $stb where ts >= $ts0 and ts <= $tsu slimit 5 offset 1
#sql_error select top(c1, 1) from $stb where ts >= $ts0 and ts <= $tsu slimit 5 offset 1
#sql_error select bottom(c1, 1) from $stb where ts >= $ts0 and ts <= $tsu slimit 5 offset 1
### select from stb + group by + slimit offset
sql select max(c1), min(c2), avg(c3), sum(c4), spread(c5), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1 slimit 5 soffset 0
if $rows != 5 then
return -1
endi
#if $data08 != NULL then
#if $data08 != 涛思nchar9 then
# return -1
#endi
$res = $tbPrefix . 0
if $data09 != $res then
return -1
endi
$res = $tbPrefix . 1
if $data19 != $res then
return -1
endi
$res = $tbPrefix . 4
if $data49 != $res then
return -1
endi
#sql reset query cache
sql select max(c1), min(c2), avg(c3), sum(c4), spread(c5), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1 order by t1 asc slimit 5
if $rows != 5 then
return -1
endi
if $data00 != 9 then
return -1
endi
$res = $tbPrefix . 0
print res = $res
if $data09 != $res then
return -1
endi
$res = $tbPrefix . 4
if $data49 != $res then
return -1
endi
## asc
sql select max(c1), min(c2), avg(c3), sum(c4), spread(c5), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1 order by t1 asc slimit 4 soffset 1
if $rows != 4 then
return -1
endi
if $data00 != 9 then
return -1
endi
$res = $tbPrefix . 1
if $data09 != $res then
return -1
endi
$res = $tbPrefix . 4
if $data39 != $res then
return -1
endi
## desc
sql select max(c1), min(c2), avg(c3), sum(c4), spread(c5), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1 order by t1 desc slimit 4 soffset 1
if $rows != 4 then
return -1
endi
if $data00 != 9 then
return -1
endi
$res = $tbPrefix . 8
if $data09 != $res then
return -1
endi
$res = $tbPrefix . 5
if $data39 != $res then
return -1
endi
### limit + slimit
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1 order by t1 asc slimit 4 soffset 1 limit 0
if $rows != 0 then
return -1
endi
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1 order by t1 asc slimit 4 soffset 1 limit 2 offset 1
if $rows != 0 then
return -1
endi
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1,t2 order by t1 asc slimit 4 soffset 1 limit 1 offset 0
if $rows != 4 then
return -1
endi
if $data00 != 9 then
return -1
endi
$res = $tbPrefix . 1
if $data08 != $res then
return -1
endi
print data09 = $data09
if $data09 != 1 then
return -1
endi
$res = $tbPrefix . 4
if $data38 != $res then
return -1
endi
if $data39 != 4 then
return -1
endi
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb group by t1,t2 order by t1 desc slimit 4 soffset 1 limit 1 offset 0
if $rows != 4 then
return -1
endi
$res = $tbPrefix . 8
if $data08 != $res then
return -1
endi
if $data09 != 8 then
return -1
endi
$res = $tbPrefix . 5
if $data38 != $res then
return -1
endi
if $data39 != 5 then
return -1
endi
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb where ts >= $ts0 and ts <= $tsu and t2 >= 2 and t3 <= 5 group by t1,t2,t3 order by t1 asc slimit 3 soffset 1 limit 1 offset 0
if $rows != 3 then
return -1
endi
if $data00 != 9 then
return -1
endi
$res = $tbPrefix . 3
if $data08 != $res then
return -1
endi
if $data09 != 3 then
return -1
endi
$res = $tbPrefix . 4
if $data18 != $res then
return -1
endi
if $data19 != 4 then
return -1
endi
$res = $tbPrefix . 5
if $data28 != $res then
return -1
endi
if $data29 != 5 then
return -1
endi
### slimit + fill
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb where ts >= $ts0 and ts <= $tsu and t2 >= 2 and t3 <= 5 interval(5m) fill(value, -1, -2) group by t1 slimit 4 soffset 4 limit 0 offset 0
if $rows != 0 then
return -1
endi
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb where ts >= $ts0 and ts <= $tsu and t2 >= 2 and t3 <= 9 interval(5m) fill(value, -1, -2) group by t1 slimit 4 soffset 4 limit 2 offset 0
print select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb where ts >= $ts0 and ts <= $tsu and t2 >= 2 and t3 <= 9 interval(5m) fill(value, -1, -2) group by t1 slimit 4 soffset 4 limit 2 offset 0
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb where ts >= $ts0 and ts <= $tsu and t2 >= 2 and t3 <= 9 interval(5m) fill(value, -1, -2) group by t1 order by t1 desc slimit 4 soffset 4 limit 2 offset 0
sql select max(c1), min(c2), avg(c3), sum(c4), sum(c6), count(c7), first(c8), last(c9) from $stb where ts >= $ts0 and ts <= $tsu and t2 >= 2 and t3 <= 9 interval(5m) fill(value, -1, -2) group by t1 order by t1 asc slimit 4 soffset 4 limit 2 offset 598
if $rows != 4 then
return -1
endi
if $data00 != @18-09-19 10:50:00.000@ then
return -1
endi
if $data01 != 9 then
return -1
endi
if $data09 != slm_tb6 then
return -1
endi
if $data10 != @18-09-19 10:50:00.000@ then
return -1
endi
if $data12 != 9 then
return -1
endi
if $data13 != 9.000000000 then
return -1
endi
if $data19 != slm_tb7 then
return -1
endi
if $data20 != @18-09-19 10:50:00.000@ then
return -1
endi
if $data24 != 9.000000000 then
return -1
endi
if $data29 != slm_tb8 then
return -1
endi
if $data30 != @18-09-19 10:50:00.000@ then
return -1
endi
if $data35 != 9 then
return -1
endi
if $data36 != 1 then
return -1
endi
if $data37 != binary9 then
return -1
endi
if $data38 != 涛思nchar9 then
return -1
endi
if $data39 != slm_tb9 then
return -1
endi
sql select count(ts) from $stb group by t1,t2,t3,t4,t5,t6 order by t1 desc
if $rows != $tbNum then
return -1
endi
$res = $rowNum + 1
if $data00 != $res then
return -1
endi
if $data90 != $res then
return -1
endi
if $data01 != slm_tb9 then
return -1
endi
if $data12 != 8 then
return -1
endi
if $data23 != 7 then
return -1
endi
if $data34 != 涛思slm_tb6 then
return -1
endi
if $data45 != 5.000000000 then
return -1
endi
if $data56 != 1 then
return -1
endi
$res = $rowNum + 1
if $data60 != $res then
return -1
endi
if $data71 != slm_tb2 then
return -1
endi
sql select count(c1) from $stb group by t1,t2,t3,t4,t5,t6 order by t1 desc
if $rows != 10 then
return -1
endi
if $data00 != $rowNum then
return -1
endi
if $data90 != $rowNum then
return -1
endi
if $data01 != slm_tb9 then
return -1
endi
if $data12 != 8 then
return -1
endi
if $data23 != 7 then
return -1
endi
if $data34 != 涛思slm_tb6 then
return -1
endi
if $data45 != 5.000000000 then
return -1
endi
if $data56 != 1 then
return -1
endi
if $data60 != $rowNum then
return -1
endi
if $data71 != slm_tb2 then
return -1
endi
## [TBASE-604]
#sql_error select count(tbname) from slm_stb0 group by t1
#sql show databases
## [TBASE-605]
sql_error select * from slm_stb0 where t2 >= 2 and t3 <= 9 group by tbname slimit 40 limit 1;