public inbox for [email protected]  
help / color / mirror / Atom feed
From: David G. Johnston <[email protected]>
To: Guyren Howe <[email protected]>
Cc: Erik Wienhold <[email protected]>
Cc: PG-General Mailing List <[email protected]>
Subject: Re: nth_value out of more than n values returns null
Date: Mon, 4 Nov 2024 16:44:24 -0700
Message-ID: <CAKFQuwZH2C=itB7h=S+0UiG5k=U4PsdaLKxsWenZ7GWFdAsDxA@mail.gmail.com> (raw)
In-Reply-To: <4e60ede0-86a5-4900-b415-05d68ad75cb1@Spark>
References: <3ed0759d-c332-4f96-a147-499a694e9204@Spark>
	<[email protected]>
	<4e60ede0-86a5-4900-b415-05d68ad75cb1@Spark>

On Monday, November 4, 2024, Guyren Howe <[email protected]> wrote:

> I’m trying to get the id of the 5,000,000th record, so I can join against
> it to get a name. I didn’t fully understand what the docs say there. What
> am I missing?
>

So just use “offset 5_000_000 limit 1”.  Bringing in a window function here
seems unhelpful.

David J.


view thread (6+ messages)  latest in thread

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]
  Subject: Re: nth_value out of more than n values returns null
  In-Reply-To: <CAKFQuwZH2C=itB7h=S+0UiG5k=U4PsdaLKxsWenZ7GWFdAsDxA@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