How to improve performance of a query that joins three tables?
Step 1:  Build a query that computes lastdt, lastdtc, and status.

Step 2:  Use that as a "derived" table to join to the other table(s) for the rest of the info.

The intent of Step 1 is to focus on the complexity of the GROUP BY and yield a much smaller table.  Then Step 2 has less work to do.