sql select * from $mt where ts > 1626739440001 and ts < 1626739500001
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 ts > 1626739440001 and tbcol1 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001
if $rows != 5 then
return -1
endi
print =============== step8
sql select * from $mt where ts > 1626739440001 and tbcol2 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001
if $rows != 5 then
return -1
endi
print =============== step9
sql select * from $mt where ts > 1626739440001 and tbcol3 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001
if $rows != 5 then
return -1
endi
print =============== step10
sql select * from $mt where ts > 1626739440001 and tbcol4 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001
if $rows != 5 then
return -1
endi
print =============== step11
sql select * from $mt where ts > 1626739440001 and tbcol2 = 1 and tbcol1 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol2 <> 1 and tbcol1 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol2 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol2 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol2 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol2 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
print =============== step12
sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol1 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol1 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol1 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol1 <> 0
if $rows != 5 then
return -1
endi
print =============== step13
sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol2 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol2 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol2 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol2 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol2 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0
if $rows != 5 then
return -1
endi
print =============== step14
sql select * from $mt where ts > 1626739440001 and tbcol3 = 1 and tbcol4 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 1 and tbcol4 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 = 0 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 = 0 and tbcol4 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol3 <> 0 and tbcol4 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol3 <> 0 and tbcol4 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol3 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol4 <> 0
if $rows != 5 then
return -1
endi
print =============== step15
sql select * from $mt where ts > 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol1 <> 1 and tbcol2 <> 1 and tbcol3 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol1 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol1 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol1 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
print =============== step16
sql select * from $mt where ts > 1626739440001 and tbcol4 = 1 and tbcol2 = 1 and tbcol3 = 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol4 <> 1 and tbcol2 <> 1 and tbcol3 <> 1
if $rows != 75 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts < 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol4 = 0 and tbcol2 = 0 and tbcol3 = 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts <= 1626739440001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 25 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and ts < 1626739500001 and tbcol4 <> 0 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
sql select * from $mt where ts > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0
if $rows != 5 then
return -1
endi
print =============== step17
sql select * from $mt where ts > 1626739440001 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 > 1626739440001 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 < 1626739440001 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 < 1626739440001 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 <= 1626739440001 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 <= 1626739440001 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 > 1626739440001 and ts < 1626739500001 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 > 1626739440001 and tbcol4 <> 0 and ts < 1626739500001 and ts < 1626739500001 and tbcol2 <> 0 and tbcol3 <> 0 and tbcol1 <> 0
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where tbcol1 = 1 group by tgcol1 order by count(tbcol1) 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 group by tgcol1 order by count(tbcol1) 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 group by tgcol1 order by count(tbcol1) 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 group by tgcol1 order by count(tbcol1) desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 group by tgcol2 order by count(tbcol1) desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 group by tgcol2 order by count(tbcol1) desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 group by tgcol2 order by count(tbcol1) desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 group by tgcol2 order by count(tbcol1) desc
sql select count(tbcol1), avg(tbcol1), sum(tbcol1), min(tbcol1), max(tbcol1), first(tbcol1), last(tbcol1) from $mt where ts < 1626739440001 and tbcol1 = 1 and tbcol2 = 1 and tbcol3 = 1 and tbcol4 = 1 group by tgcol2 order by count(tbcol1) 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 partition by tgcol1 interval(1d) 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 partition by tgcol2 interval(1d) 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 partition by tgcol3 interval(1d) 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 partition by tgcol4 interval(1d) order by tgcol4 desc