Link to home
Start Free TrialLog in
Avatar of Karen Schaefer
Karen SchaeferFlag for United States of America

asked on

Determine Min & Max Date in Oracle over a group with same empid

how do I determine the min(eff_from_date) and the Max(eff_to_date) over a group of records for the same employee id?

What is the correct syntax?
EmpID       NAme                          eff_from_date  eff_to_date   Change Date
123564   SMITH, JOHN                      06/03/2017        12/31/2049      01/01/2018
666601      JOHNSON, JOHN         07/05/2017        07/07/2017      07/04/2017
666601   JOHNSON, JOHN         07/08/2017        12/31/2049      01/01/2018
56464     Jackson, Jim                   06/01/2016      01/6/2017    01/10/2018
56464     Jackson, Jim                   01/06/2017      12/31/2049       01/10/2018
So what is the best method to group by EmpID and determine the min(eff_from_date) and the Max(eff_to_date)?

Thanks,

Karen
ASKER CERTIFIED SOLUTION
Avatar of Peter Chan
Peter Chan
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Karen,
Is this resolved?