1. <tfoot id='zSoXw'></tfoot>

    2. <i id='zSoXw'><tr id='zSoXw'><dt id='zSoXw'><q id='zSoXw'><span id='zSoXw'><b id='zSoXw'><form id='zSoXw'><ins id='zSoXw'></ins><ul id='zSoXw'></ul><sub id='zSoXw'></sub></form><legend id='zSoXw'></legend><bdo id='zSoXw'><pre id='zSoXw'><center id='zSoXw'></center></pre></bdo></b><th id='zSoXw'></th></span></q></dt></tr></i><div id='zSoXw'><tfoot id='zSoXw'></tfoot><dl id='zSoXw'><fieldset id='zSoXw'></fieldset></dl></div>
        <bdo id='zSoXw'></bdo><ul id='zSoXw'></ul>
      <legend id='zSoXw'><style id='zSoXw'><dir id='zSoXw'><q id='zSoXw'></q></dir></style></legend>

      1. <small id='zSoXw'></small><noframes id='zSoXw'>

      2. 在视图 oracle 中进行累积总和

        Make cumulative sum in view oracle(在视图 oracle 中进行累积总和)

              <tfoot id='GJ932'></tfoot>
                <legend id='GJ932'><style id='GJ932'><dir id='GJ932'><q id='GJ932'></q></dir></style></legend>

                <i id='GJ932'><tr id='GJ932'><dt id='GJ932'><q id='GJ932'><span id='GJ932'><b id='GJ932'><form id='GJ932'><ins id='GJ932'></ins><ul id='GJ932'></ul><sub id='GJ932'></sub></form><legend id='GJ932'></legend><bdo id='GJ932'><pre id='GJ932'><center id='GJ932'></center></pre></bdo></b><th id='GJ932'></th></span></q></dt></tr></i><div id='GJ932'><tfoot id='GJ932'></tfoot><dl id='GJ932'><fieldset id='GJ932'></fieldset></dl></div>
              • <small id='GJ932'></small><noframes id='GJ932'>

                  <tbody id='GJ932'></tbody>

                  <bdo id='GJ932'></bdo><ul id='GJ932'></ul>

                  本文介绍了在视图 oracle 中进行累积总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想在 oracle 中创建视图,如何在 oracle 的屏幕截图中获得我想要的saldo"值?有人可以给我脚本吗?

                  I want to make a view in oracle, how can I get value of 'saldo' that I supposed like in this screenshoot with oracle? can someone give me the script?

                  我想要的结果:

                  dateacct   period_id   startdate   enddate     debit   credit   saldo
                  7/10/2015     1        1/10/2015   30/10/2015   25       0        25
                  8/10/2015     1        1/10/2015   30/10/2015   0        5        20
                  9/10/2015     1        1/10/2015   30/10/2015   0        3        17
                  10/10/2015    1        1/10/2015   30/10/2015   4        0        21
                  

                  注意:dateacct、period_id、startdate、enddate、credit、debit 是我从 'akun' 表中取出的列.

                  Notes: dateacct,period_id,startdate,enddate,credit,debit are the column that I take from 'akun' table.

                  推荐答案

                  试试这个:

                  SELECT DATEACCT, PERIOD_ID, STARTDATE, ENDDATE, CREDIT, DEBIT,
                      SUM (DEBIT-CREDIT) OVER (ORDER BY DATEACCT,PERIOD_ID,STARTDATE,ENDDATE) saldo
                  from AKUN
                  ORDER BY DATEACCT, PERIOD_ID, STARTDATE, ENDDATE;
                  

                  这篇关于在视图 oracle 中进行累积总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  How to select the first row for each group in MySQL?(如何在MySQL中为每个组选择第一行?)
                  MySQL - Fetching lowest value(MySQL - 获取最低值)
                  Add and link mysql libraries in a cmakelist.txt(在 cmakelist.txt 中添加和链接 mysql 库)
                  What is a good database design (schema) for a attendance database?(考勤数据库的良好数据库设计(架构)是什么?)
                  <i id='uIfLq'><tr id='uIfLq'><dt id='uIfLq'><q id='uIfLq'><span id='uIfLq'><b id='uIfLq'><form id='uIfLq'><ins id='uIfLq'></ins><ul id='uIfLq'></ul><sub id='uIfLq'></sub></form><legend id='uIfLq'></legend><bdo id='uIfLq'><pre id='uIfLq'><center id='uIfLq'></center></pre></bdo></b><th id='uIfLq'></th></span></q></dt></tr></i><div id='uIfLq'><tfoot id='uIfLq'></tfoot><dl id='uIfLq'><fieldset id='uIfLq'></fieldset></dl></div>
                • <tfoot id='uIfLq'></tfoot>
                        <tbody id='uIfLq'></tbody>
                    • <legend id='uIfLq'><style id='uIfLq'><dir id='uIfLq'><q id='uIfLq'></q></dir></style></legend>

                      <small id='uIfLq'></small><noframes id='uIfLq'>

                        <bdo id='uIfLq'></bdo><ul id='uIfLq'></ul>