sql select * from $mt where ts > now + 4m and ts < now + 5m
if $rows != 10 then
return -1
endi
print =============== step3
sql select * from $mt where tbcol1 = 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 <> 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 = 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 <> 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 = 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 <> 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 = 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol1 <> 0
if $rows != 100 then
return -1
endi
print =============== step4
sql select * from $mt where tbcol2 = 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol2 <> 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol2 = 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol2 <> 1
if $rows != 100 then
return -1
endi
print =============== step5
sql select * from $mt where tbcol3 = 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol3 <> 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol3 = 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol3 <> 1
if $rows != 100 then
return -1
endi
print =============== step6
sql select * from $mt where tbcol4 = 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol4 <> 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol4 = 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol4 <> 1
if $rows != 100 then
return -1
endi
print =============== step7
sql select * from $mt where tbcol5 = 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol5 <> 0
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol5 = 1
if $rows != 100 then
return -1
endi
sql select * from $mt where tbcol5 <> 1
if $rows != 100 then
return -1
endi
print =============== step8
sql select * from $mt where ts > now + 4m and tbcol1 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol1 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m
if $rows != 5 then
return -1
endi
print =============== step9
sql select * from $mt where ts > now + 4m and tbcol2 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol2 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m
if $rows != 5 then
return -1
endi
print =============== step10
sql select * from $mt where ts > now + 4m and tbcol3 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol3 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m
if $rows != 5 then
return -1
endi
print =============== step11
sql select * from $mt where ts > now + 4m and tbcol4 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m
if $rows != 5 then
return -1
endi
print =============== step12
sql select * from $mt where ts > now + 4m and tbcol5 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol5 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol5 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol5 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol5 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol5 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m
if $rows != 5 then
return -1
endi
print =============== step13
sql select * from $mt where ts > now + 4m and tbcol2 = 1 and tbcol1 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol2 <> 1 and tbcol1 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol2 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol2 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol2 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol2 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol2 <> 0 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol2 <> 0 and ts < now + 5m and ts < now + 5m and tbcol1 <> 0
if $rows != 5 then
return -1
endi
print =============== step14
sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol2 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol2 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol2 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0
if $rows != 5 then
return -1
endi
print =============== step15
sql select * from $mt where ts > now + 4m and tbcol3 = 1 and tbcol4 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol3 <> 1 and tbcol4 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol3 = 0 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol3 <> 0 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol3 = 0 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol3 <> 0 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol3 <> 0 and tbcol4 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol3 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0
if $rows != 5 then
return -1
endi
print =============== step16
sql select * from $mt where ts > now + 4m and tbcol5 = 1 and tbcol4 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol5 <> 1 and tbcol4 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol5 = 0 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol5 <> 0 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol5 = 0 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol5 <> 0 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol5 <> 0 and tbcol4 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol5 <> 0 and ts < now + 5m and ts < now + 5m and tbcol4 <> 0
if $rows != 5 then
return -1
endi
print =============== step17
sql select * from $mt where ts > now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol1 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
print =============== step18
sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
print =============== step19
sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
print =============== step20
sql select * from $mt where ts > now + 4m and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol1 = 1 and tbcol5 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1 and tbcol1 <> 1 and tbcol5 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0 and tbcol1 = 0 and tbcol5 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= now + 4m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > now + 4m and ts < now + 5m and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > now + 4m and tbcol4 <> 0 and ts < now + 5m and ts < now + 5m and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0 and tbcol5 <> 0
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 group by tgcol1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 group by tgcol1
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 group by tgcol2
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 group by tgcol2
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < now + 4m and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 group by tgcol2
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 interval(1d) group by tgcol1 order by tgcol1 desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 interval(1d) group by tgcol2 order by tgcol2 desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 interval(1d) group by tgcol3 order by tgcol3 desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 interval(1d) group by tgcol4 order by tgcol4 desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 and tbcol5 = 1 interval(1d) group by tgcol5 order by tgcol5 desc