Distinct list of data from entitylist?

Posted by Muhsinathk under ASP.NET on 6/13/2012 | Points: 10 | Views : 1266 | Status : [Member] | Replies : 3
Hi,

I have a entity list with the name SWtudent.
StudentName and Mark are the two properties of that entity list Student.

There are 5 students

Sinu - 50
Sinu - 75
Jinu - 50
Jinu - 150
Manu - 45
Anu - 47
Sanu - 48


I want distinct list of student's depending on Mark(Highest mark of that student)..

I want following output

OUTPUT

Sinu - 75
Jinu - 150
Manu - 45
Anu - 47
Sanu - 48




Responses

Posted by: Sabarimahesh on: 6/14/2012 [Member] Bronze | Points: 25

Up
0
Down
Table have any identity column

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sabarimahesh on: 6/14/2012 [Member] Bronze | Points: 25

Up
0
Down
Show me the Table Structure

Life is a Race
Thanks & Regards
By
Sabari Mahesh P M

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Johnbhatt on: 6/23/2012 [Member] Starter | Points: 25

Up
0
Down
use a sql query like this:

SELECT DISTINCT * StudentName, Marks FROM SWtudent where Marks > 


John Bhatt
Glad to Know, Free to Share.....
http://www.johnbhatt.com

Muhsinathk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response