我需要在SQL中进行Saldo计算的帮助 [英] I need help whith Saldo Calculation in SQL

查看:82
本文介绍了我需要在SQL中进行Saldo计算的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用SQL函数进行(Saldo)计算,在其中我将数据(输入,输出)保存在tblCalculate表中.

输入输出Saldo
100 | 50 | 50
100 | 30 | 220
50 | 0 | 270
300 | 400 | 170

How to do the (Saldo) calculation with a SQL Function where I saved the data (Input, Output) in tblCalculate table.

Input Output Saldo
100 | 50 | 50
100 | 30 | 220
50 | 0 | 270
300 | 400 | 170

推荐答案

已阅读此页,您应该可以从他们的演示中弄清楚;

http://dev.mysql.com/tech-resources/articles/rolling_sums_in_mysql.html [ ^ ]
Have a read of this page, you should be able to work it out from what they are demonstrating;

http://dev.mysql.com/tech-resources/articles/rolling_sums_in_mysql.html[^]


这篇关于我需要在SQL中进行Saldo计算的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆