SQLite: accumulator (sum) column in a SELECT statement

后端 未结 3 1427
礼貌的吻别
礼貌的吻别 2020-12-28 20:16

I have a table like this one:

SELECT value FROM table;

value
1
3
13
1
5

I would like to add an accumul

3条回答
  •  清歌不尽
    2020-12-28 20:43

    The operation is called a running sum. SQLite does not support it as is, but there are ways to make it work. One is just as Sebastian Brózda posted. Another I detailed here in another question.

提交回复
热议问题