public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Willow Chargin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Subject: Re: Functionally dependent columns in SELECT DISTINCT
Date: Fri, 13 Sep 2024 10:46:10 -0700
Message-ID: <CAKFQuwYrn=Z2Yk4CJ_FGBrsu4ubvcqK101VmzviyfY0chy+=SQ@mail.gmail.com> (raw)
In-Reply-To: <CAALRJs7PVbctiMzb9g5NrLET-jPEZpjToY1F-w8CmGbWid5J7g@mail.gmail.com>
References: <CAALRJs5ne=gPYG=FdeY-G0p9QyjXHhPhAyAsJ_evdCwG3vuhug@mail.gmail.com>
	<[email protected]>
	<CAALRJs5QkE-yWVdxQxOLXbM8DyPVV3M_=zfsPK17SV-zHQsASQ@mail.gmail.com>
	<CAKFQuwYEtU7doien_XGh58vjRdsJezXp2BQvKdLcyVZQwhLmgg@mail.gmail.com>
	<CAALRJs7PVbctiMzb9g5NrLET-jPEZpjToY1F-w8CmGbWid5J7g@mail.gmail.com>

>
>
>
> > 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.


view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Functionally dependent columns in SELECT DISTINCT
  In-Reply-To: <CAKFQuwYrn=Z2Yk4CJ_FGBrsu4ubvcqK101VmzviyfY0chy+=SQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox