Aggregate Function

  • Hi all,

    Can some one explain the use of Aggregate functions

    Dan

  • Aggregate functions are those which will iterate over a set of rows called a group and then provide the output for each group.

    Ex: sum,count etc where they will iterate over a set of rows in the table on a group by column

  • Just a thought... I don't have 2k5 so I'm not sure how to get there... but questions like this not only deserve the fine response above, but you just gotta assume that the OP has no clue about Books Online... would someone explain how to get to BOL in 2k5 so this poor person can begin to train them self? 😉

    --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)

  • Well, if you have a standard installation it's Start -> All Programs -> Microsoft SQL Server 2005 -> Documentation and Tutorials -> SQL Server Books Online. It's all on the MSDN website as well - if you google "sql server aggregate functions" then it would probably be one of the first results. Don't forget to download the most recent update of BOL from Microsoft every now and then.

    John

  • Perfect, John...

    --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 5 posts - 1 through 4 (of 4 total)

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