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

  • SEARCH
  • Home
  • 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 5933039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:55:05+00:00 2026-05-22T14:55:05+00:00

I order some records by their value. If two records have the same value

  • 0

I order some records by their value. If two records have the same value i want to order those two records by their date.
For example:

record1 34 1.1.2000
record2 26 3.4.2000
record3 26 2.4.2001
record4 76 1.5.2000

This should be ordered like this:

record4 76 1.5.2000
record1 34 1.5.2000
record3 26 2.4.2001
record2 26 3.4.2000

How can i manage this in SQL?

  • 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-05-22T14:55:05+00:00Added an answer on May 22, 2026 at 2:55 pm

    Like this:

    SELECT * 
    FROM myTable
    ORDER BY Value, Date
    

    Each of these can also have an ASC/DESC specifier:

    SELECT * 
    FROM myTable
    ORDER BY Value ASC, Date DESC
    

    Here is a link to MSDN, describing the syntax of the ORDER BY clause.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Whenever I have some records/objects that I want to be in a certain order,
So I have a class is something like this public class Order { //some
I have next tables Order , Transaction , Payment . Class Order has some
I have a hashtable . values() method returns values in some order different from
I'm using PHP in order to redirect some search query. There is some example
I have installed Sphinx in order to document some Python modules and class I'm
I am joining a table that has two record id fields (record1, record2) to
how can I create a query in order to select some records every time
I've added some php flags in my htaccess in order to change some php
I can use the MS Word ActiveX control in order to access some parameters

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.