有关sql的问题(paradox)
fstao 2000-02-22 11:36:00 假如用paradox7建一表table1.db
其数据和字段如下:
name price
a 10
b 20
c 40
d 20
e 30
f 10
g 20
我想实现每两条记录的“price”的和最后的总记录“price”的和。例如,table1.db变为:
name price
a 10
b 20
页合计 30
c 40
d 20
页合计 60
e 30
f 10
页合计 40
g 20
页合计 20
总合计 150
如何用SQL实现?