Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Posts
    20

    Unhappy Unanswered: SQL to calculate running totals

    Hi all,

    Suppose my data looks like this:

    AccoutNumber UniqueID PmtFreq
    111111111 1 3
    111111111 2 2
    111111111 3 4
    222222222 1 2
    222222222 2 3

    SQL to calculate a running total of PmtFreq should produce this:

    Cumu_total
    111111111 1 3 3
    111111111 2 2 5
    111111111 3 4 9
    222222222 1 2 2
    222222222 2 3 5

    Thanks for all your help!!

  2. #2
    Join Date
    Aug 2004
    Posts
    42
    Join the table to itself. The rest is left as (another) exercise.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •