请教下,totalvolume - move(totalvolume, 1)会导致第一个数据为空,怎么用totalvolume原来的值填这个空值?

下面这个代码可以吗?

select date, time, wind_code,  totalvolume - nullFill!(move(totalvolume, 1), 0)  from a context by  date, wind_code
请先 登录 后评论

1 个回答

wale

eachPre函数将给定函数/运算符应用于X中所有相邻的数据对,它可以指定初始值:

select date, time, wind_code,  eachPre(-, totalvolume, 0) as deltaVol  from a context by  date, wind_code
请先 登录 后评论