Comment

Comment by azurezyq

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.

parent azurezyq 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton