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.
Author |
Topic |
younas02
Starting Member
28 Posts |
Posted - 2012-06-27 : 01:36:42
|
i want to select all columns of a row using max() function. for examplei m using select testname,max(marks) from table where name='ali' group by testname it gives corect result. i.e, rows with maximum marks in different subject. but when i use more than 2 column it gives all row where name='ali'.considering 6 total records with 2 records of each subject mean 3, subjects 2 test result records of each.i want to select rows with maximum marks . in case of 3 subjects i require only 3 rows with maximum marksplz help me...... |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|