Results 1 to 3 of 3

Thread: Sum Question

  1. #1
    Join Date
    Jan 2012
    Posts
    52

    Unanswered: Sum Question

    Hi,

    I need help with the sum function. I have this query which works just the way I want:

    Code:
     
    SELECT SUM (SPLIT) FROM CC_SPLIT WHERE COMPANY = 'XXX' AND ACCOUNT ='YYY'
    However I would like to do this for all the companies and accounts at the same time rather than needed to write one by one, is this possible?

    Thanks in advance
    Last edited by buzmay; 02-01-12 at 10:47.

  2. #2
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Code:
    select company, account, sum(split)
    from cc_split
    group by company, account

  3. #3
    Join Date
    Jan 2012
    Posts
    52
    Thanks a lot

Posting Permissions

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