Should be simple

I am not trained in SQL, but know enough to create SIMPLE tables, but I can't figure this one out.

I need to combine my "Deals" table with my "Activity" table ("ID" = "Related To"), but I only want to show the most recent record from the "Activity" table ("Due Date").

I have all the activities linked, but can't figure out how to show just the latest record. I appreciate any help you all can provide.

For SQL Server:


SELECT D.ID, D.othercolumn1, D.othercolumn2, ..., A.somecolumn1, A.somecolumn2, ...
FROM Deals D
CROSS APPLY (
    SELECT TOP (1) *
    FROM Activity A
    WHERE A.ID = D.ID
    ORDER BY "Due Date" DESC
) AS A

SELECT D.id , D.column1 , D.column2, A.column1, A.column2 , A.Due_Date
FROM Deals D
LEFT JOIN Activity A
ON D.id = A.id
ORDER BY A.Due_Date DESC
LIMIT 1