Q:

how can i get highest marks datewise in mysql

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

A:

Try this: 
SELECT tid, marks, date 
FROM post 
ORDER BY date DESC, marks DESC 
LIMIT 0,10; 

Check this SQL FIDDLE DEMO
OUTPUT 
| ID | MARKS |                           DATE |
-----------------------------------------------
|  4 |   105 | January, 16 2013 00:00:00+0000 |
|  3 |   100 | January, 16 2013 00:00:00+0000 |
|  1 |    97 | January, 15 2013 00:00:00+0000 |
|  2 |   104 | January, 14 2013 00:00:00+0000 |

