mcgrcoAgain
Registered User.
- Local time
- Today, 11:49
- Joined
- Jan 26, 2006
- Messages
- 47
Firstly, i am a sql newbie so apologies if this is an obvious answer
I need to joing a table to another but unfortunatly theres no one to one relationship. What I would like to do on the table with mutiple records is is group by the key and sum by amount . I then want the query to select the max amount by record within the group and show me the details of the max amount. Is there a tecnique I can use that’s not to complicated. Any help is appreciated
E.g
Key Amount text
1 10 Wrong text 1
1 5 Wrong text 2
1 1000.26 RightText
The query should return
groupedKey SumAmount MaxAmount Maxtext
1 1015.26 1000.26 Right Text T
I need to joing a table to another but unfortunatly theres no one to one relationship. What I would like to do on the table with mutiple records is is group by the key and sum by amount . I then want the query to select the max amount by record within the group and show me the details of the max amount. Is there a tecnique I can use that’s not to complicated. Any help is appreciated
E.g
Key Amount text
1 10 Wrong text 1
1 5 Wrong text 2
1 1000.26 RightText
The query should return
groupedKey SumAmount MaxAmount Maxtext
1 1015.26 1000.26 Right Text T