Hi!
There is interesting question in Stackoverflow.
This query works for MS SQL:
SELECT *
FROM
(
SELECT *, ROW_NUMBER() OVER (PARTITION BY client_id ORDER BY date_updated DESC) AS rn
FROM client_address
) a
WHERE a.rn = 1
There is one answer there, which solves the task:
