Link to home
Start Free TrialLog in
Avatar of Robert Rosenbsuch
Robert Rosenbsuch

asked on

Return Max Date

Ok below is my current SQL statement for a query in AccessDB I am trying to find a way to add a find max date (or most recent date) from the TxnDate column and only return results with the most recent TxnDate. Any help is greatly appreciated. Thanka


SELECT Customer.FullName, Customer.Email, Customer.Phone, ReceivePayment.TxnDate, ReceivePayment.TotalAmount, Customer.TotalBalance, Customer.CustomFieldDepartment
FROM Customer INNER JOIN ReceivePayment ON Customer.ListID = ReceivePayment.CustomerRefListID
GROUP BY Customer.FullName, Customer.Email, Customer.Phone, ReceivePayment.TxnDate, ReceivePayment.TotalAmount, Customer.TotalBalance, Customer.CustomFieldDepartment, Customer.IsActive
HAVING (((Customer.TotalBalance)>30) AND ((Customer.IsActive)=Yes))
ORDER BY Customer.FullName;
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia 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