Query to Return Most Recent Date

Princecoxy

New member
Local time
Today, 21:45
Joined
May 29, 2022
Messages
1
Hello All, I seem to be stuck on this query. A Customer can have multiple Interaction dates and Next Appointments which can have multiple entries by Date. I am trying to query the most recent Date for each NextAppointment per Customer.

So, looking at the below sample I would want to return 13-Mar-22 for that particular Customer and 21-Jul-22 for Customer with identification number 1234. These rows contain the most recent Date per NextAppointment.

Any thoughts on how I can accomplish this? Thanks.
 

Attachments

  • Screenshot 2022-05-29 104948.jpg
    Screenshot 2022-05-29 104948.jpg
    42.6 KB · Views: 260
WHERE clause comes before GROUP BY.
 

Users who are viewing this thread

Back
Top Bottom