5 ms·
Window function is your friend. Row_number() over (partition by x order by) as rank Then: where rank = 1. Grouping is unordered, which is a clean definition.
by azurezyq 2y ago
Window function is your friend.
Row_number() over (partition by x order by) as rank
Then: where rank = 1.
Grouping is unordered, which is a clean definition.