I have a table, \'lasttraces\', with the following fields.
Id, AccountId, Version, DownloadNo, Date
The data looks like this:
Go a simple way to do this :-
Created one class to hold following information
Go the list of sites stored on a ArrayList object. And executed following query to sort it in descending order by Level.
var query = from MyClass object in objCollection
orderby object.Level descending
select object
Once I got the collection sorted in descending order, I wrote following code to get the Object that comes as top row
MyClass topObject = query.FirstRow()
This worked like charm.