Pilih berbeda pada satu kolom, dengan beberapa kolom dikembalikan, kueri akses MS

WITH cte AS
(   SELECT *, ROW_NUMBER() OVER (PARTITION BY id ORDER BY val1 DESC) AS rn
    FROM MyTable
)
SELECT *
FROM cte
WHERE rn = 1
MonkeySeeMonkeyDo