Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
304 views
in Technique[技术] by (71.8m points)

求表中某列往下1-4行的和

如果我想把比如往下1-4行的四个值加起来的话,DolphinDB database中有什么函数可实现?

即想要如下图所示这样的效果。4recordsum.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
a = table(1..100 as id)
select id,move(msum(id, 4),-3) from a

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...