I’m using DolphinDB for historical data processing. Can I update the field “volume” at 09:31m for each market stock with the summed values at 09:31m and 09:30m?
Asked
Active
Viewed 16 times
1 Answers
0
You can try the following the code:
t = table(`A`A`A`A`B`B`B`B as symbol, 09:28m 09:29m 09:30m 09:31m 09:28m 09:29m 09:30m 09:31m as minute, 10 20 30 40 20 15 25 10 as volume)
update t set volume = volume+move_volume from (select *,move(volume,1) from t context by symbol) where minute = 09:31m

jinwandalaohu
- 226
- 1
- 7