J
jammi
Unregistered / Unconfirmed
GUEST, unregistred user!
数据库A:
date money
2000-12-20 1000
2000-12-10 -500
2000-12-28 200
2000-10-06 700
2000-12-10 -300
日期字段无序且有可能相同,想要用SQL语句得出如下结果:
date money 余额
2000-10-06 700 700
2000-12-10 -300 400
2000-12-10 -500 -100
2000-12-20 1000 900
2000-12-28 200 1100
或
date money 余额
2000-10-06 700 700
2000-12-10 -300
2000-12-10 -500 -100
2000-12-20 1000 900
2000-12-28 200 1100
也可,请教各位大虾.
预祝各位新年好!!!
date money
2000-12-20 1000
2000-12-10 -500
2000-12-28 200
2000-10-06 700
2000-12-10 -300
日期字段无序且有可能相同,想要用SQL语句得出如下结果:
date money 余额
2000-10-06 700 700
2000-12-10 -300 400
2000-12-10 -500 -100
2000-12-20 1000 900
2000-12-28 200 1100
或
date money 余额
2000-10-06 700 700
2000-12-10 -300
2000-12-10 -500 -100
2000-12-20 1000 900
2000-12-28 200 1100
也可,请教各位大虾.
预祝各位新年好!!!