Results 1 to 2 of 2

Thread: How to select a accelerate total?

  1. #1
    Join Date
    Mar 2003
    Location
    Shanghai,China
    Posts
    1

    Question 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 ?

  2. #2
    Join Date
    Feb 2003
    Posts
    14
    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
  •