Re: Functionally dependent columns in SELECT DISTINCT

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Willow Chargin <postgresql(at)wchargin(dot)com>
Cc: shammat(at)gmx(dot)net, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Functionally dependent columns in SELECT DISTINCT
Date: 2024-09-13 17:46:10
Message-ID: CAKFQuwYrn=Z2Yk4CJ_FGBrsu4ubvcqK101VmzviyfY0chy+=SQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
>
>
> > or use a lateral subquery to surgically (fetch first 1) retrieve the
> first row when sorted by recency descending.
>
> I'm not sure that I see how to apply this when I need top-k, not top-1.
>

Fetch first k

It's just a modern limit clause.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2024-09-13 19:04:40 Re: Will hundred of thousands of this type of query cause Parsing issue
Previous Message Rob Sargent 2024-09-13 17:22:53 Re: Manual query vs trigger during data load