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.

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
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.