Click here to Skip to main content
15,912,507 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I write query for sql server view..
my data is given below..

300	353645040097938
299	353645040097938
298	353645040097938
297	353645040097938
296	353645040097938
295	353645040097938

27	353645040091111
26	353645040091111
25	353645040091111

13	012342006949335
12	012342006949335
11	012342006949335


i need result

300
27
13


i want result in single queryl...

thanks in advance..
Ganu sharma.
Posted
Updated 13-Oct-11 19:22pm
v2

1 solution

Use the following query:

SQL
select max(numbercolumn), othernumbercolumn from tablename group by othernumbercolumn
 
Share this answer
 
Comments
Espen Harlinn 13-Oct-11 17:45pm    
Right :)
Mehdi Gholam 14-Oct-11 1:22am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900