-
How to select a accelerate total?
I have a table like this:
ID Name Money
1 a 20
2 b 30
3 c 40
and I want to make a selectiong result like this :
ID Name Money Acce
1 a 20 20
2 b 30 50
3 c 40 90
How do I do ?
-
This can help you.
Select id, name, money,
(select sum(money) from Table b
where b.id <= a.id)
from money a
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|