G
Guest
I have a query where I am trying to get the same date and time where the min
qty occured. Example:
Table:
Date Time Qty
1/1/05 1:00pm 3
1/1/05 2:00pm 4
1/1/05 3:00pm 2
1/2/05 1:00pm 1
1/2/05 2:00pm 5
1/2/05 3:00pm 4
Wanted result:
1/1/05 3:00pm 2
1/2/05 1:00pm 1
Now I can get the min Qty and group the dates and it gives me the min for
the date, but I also need to know what time it happened at. I basically need
to retrieve the time of the same row the min qty occured. I hope I have
explained this well.
qty occured. Example:
Table:
Date Time Qty
1/1/05 1:00pm 3
1/1/05 2:00pm 4
1/1/05 3:00pm 2
1/2/05 1:00pm 1
1/2/05 2:00pm 5
1/2/05 3:00pm 4
Wanted result:
1/1/05 3:00pm 2
1/2/05 1:00pm 1
Now I can get the min Qty and group the dates and it gives me the min for
the date, but I also need to know what time it happened at. I basically need
to retrieve the time of the same row the min qty occured. I hope I have
explained this well.