Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Group by Question

Author  Topic 

merelogic
Starting Member

1 Post

Posted - 2007-08-31 : 20:04:26
hi,
Can please someone help me with this?

Val1 Val2 Val3
1 230 10
1 240 15
2 209 11
2 210 14
2 222 19

Above is the result of a lengthy query.
I need to find the Val3 of the max(Val2) after a group by on Val1.

Thanks

Zoroaster
Aged Yak Warrior

702 Posts

Posted - 2007-08-31 : 20:22:11
Can you post the DDL for the table and the original query?

/*-----------------------
Words are but constrained thoughts.
------------------------*/
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-09-01 : 04:07:59
Also provide information about your sql server version.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -