help with group query
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: help with group query

Threaded View

  1. #1
    Join Date
    Sep 2001
    Location
    Mexico
    Posts
    93

    Question help with group query. Details and group info in the same result

    Hi everyone,
    I need to make a query that show me details and grouping information at the same time.

    This is my original table :

    id who money
    1 Henry 10
    2 John 5
    3 John 10
    4 Mario 20

    And I want to obtain this information:

    id who money
    1 Henry 10
    Sum 10 <-- Groupping
    2 John 5
    3 John 10
    Sum 15 <-- Groupping
    4 Mario 20
    Sum 20 <-- Groupping

    I'm thinking that I can use a group by - rollup sentece.
    But I don't know how to do it.
    Any ideas?

    Thanks in advance for your help
    Regards
    Last edited by Turin; 10-31-2003 at 02:13 PM.

Posting Permissions

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


Click Here to Expand Forum to Full Width