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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:02:17+00:00 2026-06-18T05:02:17+00:00

I know my question is bit confusing but if I show you data it

  • 0

I know my question is bit confusing but if I show you data it will make more sense what I am trying to achieve.

I am reading everything from one table T only.

I am reading 6 fields from that table T.

StartKey
Name
Min
LName
MName
ID

Top Table is data, and bottom table is what I am trying to achieve.
I need to get for each startkey get max(minutes)

FORGOT TO INCLUDE 20130221 in output.

enter image description here

Here is what I tried so far

select 
       startkey,
       name,
       min,
       lname,
       mname,
       id
from T
where startkey >= '20130118'
group by startkey,name,lname,mname,id
order by startkey

but it doesn’t work

  • 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-18T05:02:18+00:00Added an answer on June 18, 2026 at 5:02 am

    For each start-key, you want to find the Max “min” value. this can be done via a nested sub-query. Then , select only where the min is equal to the max(min).
    Also, if you have a situation where two records can have the same value of startkey and min, then you will need to resolve that, otherwise you will select them both.

    select  startkey, name, min, lname, mname, id
    from T T1
    where min = 
     (select max(min) from T T2 where T1.startkey=T2.startkey)
    
    order by startkey
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know the title of this question is a bit confusing, but here it
Bit of a strange question here i know. but i wanted to know if
I know this is a bit bleeding edge, but here's the question anyway: Given
Bit of a bizarre question, but does anyone know the actual limit to the
This might sound a bit of an odd question but I know what I
I know the subject might be a bit confusing, but in my searching i
I know this question is a bit peripheral, but I'm a bit confused, because
I know the title is bit confusing for my question. Let me explain:- There
I know the title is bit confusing for my question. Let me explain:- There
The title is a bit confusing, I know, but it's the best I could

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.