I have a query that I need to run that returns the most recent updated row for each client.
In SQL Server, I would do the following:
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
Is there a similar way to do this in Intersystems cache? I do not find documentation for any ranking function.
source share