Click here to Skip to main content
       

Database

 
QuestionSSRS 2005 Pinmemberberba6-Dec-12 6:32 
AnswerRe: SSRS 2005 PinmemberDavid Mujica6-Dec-12 7:59 
AnswerRe: SSRS 2005 Pinmemberdjj556-Dec-12 9:30 
AnswerRe: SSRS 2005 PinmemberMycroft Holmes6-Dec-12 16:57 
GeneralRe: SSRS 2005 Pinmemberberba6-Dec-12 18:06 
GeneralRe: SSRS 2005 PinmemberMycroft Holmes6-Dec-12 21:43 
QuestionSQL Group By Question [modified] Pinmemberloyal ginger6-Dec-12 5:27 
AnswerRe: SQL Group By Question PinmemberBlue_Boy6-Dec-12 10:11 
You can try this query
SELECT mt.Field1,
       (
           SELECT TOP 1 mt2.Field2
           FROM   myTable mt2
           WHERE  mt2.Field1 = mt.Field1
           ORDER BY
                  mt2.Amount DESC
       ) AS Field2,
       MAX(mt.Amount)
FROM   myTable mt
GROUP BY
       mt.Field1

I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.

GeneralRe: SQL Group By Question Pinmemberloyal ginger31-Dec-12 5:48 
QuestionIssues installing ODP.NETx64 Pinmembercpp_prgmer6-Dec-12 4:18 
AnswerRe: Issues installing ODP.NETx64 PinmemberEddy Vluggen6-Dec-12 14:37 
GeneralRe: Issues installing ODP.NETx64 PinmemberPeter_in_27806-Dec-12 15:12 
GeneralRe: Issues installing ODP.NETx64 PinmemberMycroft Holmes6-Dec-12 16:52 
AnswerRe: Issues installing ODP.NETx64 PinmemberMycroft Holmes6-Dec-12 16:53 
QuestionSQL Query - append results PinmemberAndreFratelli5-Dec-12 6:43 
AnswerRe: SQL Query - append results PinmemberChris Meech5-Dec-12 6:55 
GeneralRe: SQL Query - append results PinmemberAndreFratelli5-Dec-12 7:08 
QuestionSQL 2008 Data Base Table Design suggestion PinmemberVishwaKL4-Dec-12 23:36 
AnswerRe: SQL 2008 Data Base Table Design suggestion PinmemberSimon_Whale4-Dec-12 23:43 
GeneralRe: SQL 2008 Data Base Table Design suggestion PinmemberVishwaKL4-Dec-12 23:47 
GeneralRe: SQL 2008 Data Base Table Design suggestion PinmemberSimon_Whale4-Dec-12 23:51 
AnswerRe: SQL 2008 Data Base Table Design suggestion PinmemberPIEBALDconsult5-Dec-12 3:56 
Question[HELP] how to using array in my case? (Query & PHP) [modified] Pinmemberjimmy.suharry4-Dec-12 20:14 
AnswerRe: [HELP] how to using array in my case? (Query & PHP) PinmemberMycroft Holmes4-Dec-12 20:38 
GeneralRe: [HELP] how to using array in my case? (Query & PHP) Pinmemberjimmy.suharry4-Dec-12 20:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 28 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid