Re: Functionally dependent columns in SELECT DISTINCT - Mailing list pgsql-general

From David G. Johnston
Subject Re: Functionally dependent columns in SELECT DISTINCT
Date
Msg-id CAKFQuwYrn=Z2Yk4CJ_FGBrsu4ubvcqK101VmzviyfY0chy+=SQ@mail.gmail.com
Whole thread Raw
In response to Re: Functionally dependent columns in SELECT DISTINCT  (Willow Chargin <postgresql@wchargin.com>)
List 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.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Manual query vs trigger during data load
Next
From: Greg Sabino Mullane
Date:
Subject: Re: Will hundred of thousands of this type of query cause Parsing issue