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 8101533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:00:09+00:00 2026-06-05T23:00:09+00:00

If i have the below data: route_name updatedDate route_id FF 15/06/2012 0:00 22 DD

  • 0

If i have the below data:

    route_name     updatedDate          route_id
    FF          15/06/2012 0:00         22
    DD          15/06/2012 0:00         31
    FF          16/06/2012 0:00         23
    FF          17/06/2012 0:00         24
    DD          17/06/2012 0:00         32
    DD          17/06/2012 18:00            
    FF          18/06/2012 0:00         
    FF          18/06/2012 19:00        40
    DD          20/06/2012 0:00         60

I want to run a query where i only see the route_id based in the latest updatedDate for the given route_name, so for example for route_name FF above the route_id should be 40.

I tried to do this using:

    select route_name,route_id,max(updatedDate) from route_de 
    group by route_name,route_id,updatedDate
    having count(*) >= 1
    order by route_name

but i get many repeated rows because of the updatedDate field (this is a big table). Can someone please suggest a way to archive the above?

  • 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-05T23:00:10+00:00Added an answer on June 5, 2026 at 11:00 pm
    select route_de.route_name, route_de.route_id from route_de join
    (select max(updatedDate) as maxDate, route_name from route_de group by route_name) maxRoutes
    on maxRoutes.maxDate = route_de.updatedDate and maxRoutes.route_name = route_de.route_name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have data below from streaming: 'ID|20120206|080500|0000001|0|1|record1|END' 'ID|20120206|080500|0000002|0|1|record2|END' 'ID|20120206|080500|0000003|0|1|record3|END' and i want to process
I have below sample data. AID Date Title ----- ---------- ------ 1 2011-12-12 test1
I have the data below saved as a pandas dataframe . With this data,
I have data like below AAAAAA BBBBBB CCCCCC DDDDDD EEEEEE Now there is a
I have the below markup that cannot be changed: <div>Some data</div> <span>More data</span> <a>Link
I have a table that has data like below(sorted by date) COL_A | COL_B
I have the code below : public class Anything { public int Data {
I have a table part with a few demo data as below in Oracle
I have a piece of matlab code below which reads data from a table.
I have lot of data and for sample purpose mention below data d1 date

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.