On Friday, September 13, 2024, Willow Chargin <postgresql(at)wchargin(dot)com>
wrote:
> In reality I really do want the ID columns of the
> *most recent* items.
>
Use a window function to rank them and pull out rank=1, or use a lateral
subquery to surgically (fetch first 1) retrieve the first row when sorted
by recency descending.
David J.