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 中进行累积总和

        时间:2024-04-15

              <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 中进行累积总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:MySql 中的自动视图更新 下一篇:在 SQL Server 视图中高效地将行转换为列

                  相关文章

                  <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>
                  1. <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>