Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Distinct on: a confusing, unique and useful feature in Postgres. Parent comment
So it would be:
select a, last_value(b) over(partition by a), last_value(c) over(partition by a) from table
There are no comments on this comment yet.
So it would be:
Note the lack of a "GROUP BY" so this will result in duplicates unless you add a DISTINCT.