Hello SQL/MS Access community! I have a problem! I have a query in SQL that gets the top record for each group and it works great! However, I need this to be a query in Microsoft Access. Is there anyone out there that can help me with translating it? I do not know coding at all (I can pick it apart to understand it, but I can't write it unfortunately). Any help is much appreciated!
SELECT *
FROM Table1;
WITH summary AS (
SELECT p.PK_ID,
p.Field1,
p.Field2,
ROW_NUMBER() OVER (PARTITION BY p.PK_ID
ORDER BY p.Field1 DESC) AS rk
FROM Table1 p)
SELECT s.*
FROM summary s
WHERE s.rk=1