Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:05:47+00:00 2026-06-17T13:05:47+00:00

I am trying to get the highest marks datewise in mysql. When i ran

  • 0

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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:05:48+00:00Added an answer on June 17, 2026 at 1:05 pm

    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 |
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

what I'm trying to do is this: get the 30 Authors with highest score
Trying to get the highest and lowest value from an array that I know
I'm trying to get the highest number (8 in example below) from the table
I'm trying to delete the highest value from a group. Given this data: group_table
I am trying to get Highest frequency terms out of vectors in scikit-learn. From
public function gl_popular(){ $query=$this->db->query(SELECT DISTINCT new_ques_id FROM gl_mark_ques); //echo SELECT DISTINCT new_ques_id FROM gl_mark_ques
I'm trying get the visible portion of UIImage from an UIImageView . UIImageView takes
Trying to get this expression to work, can someone look at it and tell
I'm trying to get my head around a query and I just can't figure
I'm using below query to get the unique result for receiver_id but also trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.