Markus Veretin
SSCommitted
Points: 1565
More actions
April 6, 2005 at 11:51 am
#85520
I need a select distinct <col1> from <table> and for each <col1> - only first or max(<col2>
Thanks,
Markus
Ninja's_RGR'us
SSC Guru
Points: 294069
April 6, 2005 at 11:58 am
#550887
Select Col1, max(Col2) as MaxCol2 from dbo.YourTable Group BY Col1 Order by Col1
April 6, 2005 at 12:22 pm
#550901
Thanks so much, it works.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply