Selecting the latest date

D

dericksonfl

I need to pull the latest (or most recent) week_ending value for each user in
my time tracking database.

Each employee enters time and selects the week ending field. I am to
display Year to Date totals but since not everyone works each week, it would
be helpful to know the last week_ending value for each employee.

I am experimenting with the MAX function but cannot seem to get it to work.

Thanks in advance.
 
B

Brendan Reynolds

Here's an example using the Orders table from the Northwind sample database.
This query will return the date of the most recent order for each employee
....

SELECT Max(Orders.OrderDate) AS MaxOfOrderDate, Orders.EmployeeID
FROM Orders
GROUP BY Orders.EmployeeID;
 
Top