I am trying to get the highest marks datewise in mysql.
When i ran this query :-
select tid from post order by marks desc limit 0,10;
I get the highest marks but not datewise.
And when i run this query.
select tid from post order by date desc limit 0,10.
i get value date wise first…
But i want to get the highest marks date wise..
For example my table is :–
s.no marks date
1 97 15-01-2013
2 104 14-01-2013
3 100 16-01-2013
4 105 16-01-2013
So, i want to get
s.no marks date
4 105 16-01-2013
3 100 16-01-2013
1 97 15-01-2013
2 104 14-01-2013
Try this:
Check this SQL FIDDLE DEMO
OUTPUT