Re: nth_value out of more than n values returns null - Mailing list pgsql-general

From David G. Johnston
Subject Re: nth_value out of more than n values returns null
Date
Msg-id CAKFQuwZH2C=itB7h=S+0UiG5k=U4PsdaLKxsWenZ7GWFdAsDxA@mail.gmail.com
Whole thread Raw
In response to Re: nth_value out of more than n values returns null  (Guyren Howe <guyren@gmail.com>)
Responses Re: nth_value out of more than n values returns null
Re: nth_value out of more than n values returns null
List pgsql-general
On Monday, November 4, 2024, Guyren Howe <guyren@gmail.com> 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.

pgsql-general by date:

Previous
From: Guyren Howe
Date:
Subject: Re: nth_value out of more than n values returns null
Next
From: Guyren Howe
Date:
Subject: Re: nth_value out of more than n values returns null