Link to home
Start Free TrialLog in
Avatar of Jason Livengood
Jason LivengoodFlag for United States of America

asked on

SQL Query Question

How do I select the TotalPts column with only the latest dateofchange for each driverid. I should get the latest totalpoints for each driver basically. 1 totalpts per driver. You'll notice there are multiple entries for some DriverID's.Table data sample is below. Any help would be most appreciated

Jason

TotalPts   DriverID    DateofChange
13          25422        2012-08-16  
13          25422        2011-09-07  
18          25445        2012-04-17  
29          25486        2011-08-22  
15          25535        2012-08-01  
16          25577        2011-11-21  
18          25642        2012-08-01  
18          25642        2011-08-24  
14          25642        2011-08-09  
20          25658        2011-09-07
16          25658        2011-08-08  
18          25681        2012-08-06  
14         25706        2012-04-02  
14         25722        2011-09-07  
14         25729        2012-01-04  
18         25729        2011-09-07  
14         25729        2011-08-11  
14         25738        2011-08-09  
22         25745        2012-08-13  
23         25745        2011-08-16  
13         25854        2012-08-16  
13         25854        2011-09-07  
42         25864        2012-08-14
SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America 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
SOLUTION
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
ASKER CERTIFIED SOLUTION
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
Avatar of Jason Livengood

ASKER

Thanks
Thanks for the split.  Good luck with your project.  -Jim