Results 1 to 3 of 3

Thread: Help-a-newbe

  1. #1
    Join Date
    Oct 2002
    Posts
    5

    Help-a-newbe

    How to SELECT DISTINCT col1 and SUM col2. Is it possible to do it with just one query?

    Thank You

  2. #2
    Join Date
    Nov 2002
    Location
    DE
    Posts
    246
    Taken you would like to have the sum of col2 over all occurences of col1:

    Select col1, SUM (col2)
    from yourtable
    group by col1

  3. #3
    Join Date
    Oct 2002
    Posts
    5

    ThankYou Andy

    It works. Learned more that you think.
    All the best.

Posting Permissions

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