|
有一表存在4个字段"A","B","C","D"要求:做一个查询,显示出下面的结果,其中total字段时由D字段的值叠加得到的.
如:
Total
0+5,132.71=5,132.71
5,132.71+842.87 =5,975.58
5,975.58 +4,680.00 =10,655.58
10,655.58+780.00=11,435.58
......+1,751.72 =136,665.74
即: 上一个Total+D=Total
谢谢!
A B C D Total
TIN0603000242 0603SE0001 01/03/06 5,132.71 5,132.71
TIN0603000491 0603SE0075 30/03/06 842.87 5,975.58
TIN0605000094 0605SD0002 02/05/06 4,680.00 10,655.58
TIN0605000096 0605SD0003 02/05/06 780.00 11,435.58
TIN0605000431 0605SE0074 23/05/06 1,395.65 12,831.23
TIN0606000087 0606SE0013 05/06/06 3,118.05 15,949.28
TIN0606000112 0606SE0013 05/06/06 6,407.70 22,356.98
TIN0606000152 0606AD0002 09/06/06 55,602.61 77,959.59
TIN0606000169 0606SE0038 12/06/06 20,207.77 98,167.36
TIN0606000171 0606SE0038 12/06/06 7,018.75 105,186.11
TIN0606000390 0606SE0079 26/06/06 655.20 105,841.31
TIN0606000392 0606SE0079 26/06/06 241.80 106,083.11
TIN0606000394 0606SE0079 26/06/06 10,764.47 116,847.58
TIN0606000427 0606SD0017 14/06/06 4,765.80 121,613.38
TIN0606000431 0606SE0038 13/06/06 6,746.30 128,359.68
TIN0606000487 0606SE0079 29/06/06 6,554.34 134,914.02
TIN0606000489 0606XX0005 13/06/06 1,751.72 136,665.74
|
|