enh: last function optimize
This commit is contained in:
parent
0ee36a50a6
commit
4e1daca60e
|
@ -542,7 +542,7 @@ if $data09 != 4 then
|
|||
return -1
|
||||
endi
|
||||
|
||||
sql select _wstart, max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9), t1 from $stb where ts >= $ts0 and ts <= $tsu and t1 > 1 and t1 < 5 and c1 > 0 and c2 < 9 and c3 > 1 and c4 < 7 and c5 > 4 partition by t1 interval(5m) order by t1 desc, _wstart limit 1 offset 0
|
||||
sql select _wstart, max(c1), min(c2), avg(c3), sum(c5), spread(c6), first(c7), last(c8), first(c9), t1 from $stb where ts >= $ts0 and ts <= $tsu and t1 > 1 and t1 < 5 and c1 > 0 and c2 < 9 and c3 > 1 and c4 < 7 and c5 > 4 partition by t1 interval(5m) order by t1 desc limit 1 offset 0
|
||||
if $rows != 1 then
|
||||
return -1
|
||||
endi
|
||||
|
|
Loading…
Reference in New Issue