Running Count

  • Jeff Moden (10/30/2013)


    AronB (10/30/2013)


    Thank you all for your solutions. It's greatly appreciated.

    The question now would be, do you understand how and why they work?

    Yes, I do, but would be honored to hear your explanation. I've been around this site long enough to know that you always have something insightful to add.

  • AronB (10/31/2013)


    Jeff Moden (10/30/2013)


    AronB (10/30/2013)


    Thank you all for your solutions. It's greatly appreciated.

    The question now would be, do you understand how and why they work?

    Yes, I do, but would be honored to hear your explanation. I've been around this site long enough to know that you always have something insightful to add.

    If you understand that Dwain's "Tally Table" version simply aggregates the data and then duplicates it using a "Cross Join" between the aggregate result and the "Tally Table", then I think you're probably all set. Most people don't "get" how a join with the Tally Table can create the duplicate rows.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply