Je kunt ROW_NUMBER
proberen , maar het kan uw prestaties beïnvloeden.
;WITH CTE AS
(
SELECT *, ROW_NUMBER() OVER(PARTITION BY a ORDER BY b) Corr
FROM my_table
)
SELECT *
FROM CTE
WHERE Corr = 1
Je kunt ROW_NUMBER
proberen , maar het kan uw prestaties beïnvloeden.
;WITH CTE AS
(
SELECT *, ROW_NUMBER() OVER(PARTITION BY a ORDER BY b) Corr
FROM my_table
)
SELECT *
FROM CTE
WHERE Corr = 1