Re: Can I get the number of results plus the results with a single query?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Can I get the number of results plus the results with a single query?
Дата
Msg-id CAKFQuwYR-kmTsRJDQ-2US_KR1jvjORceUMsO5jv9duZBrtZqwg@mail.gmail.com
обсуждение исходный текст
Ответ на Can I get the number of results plus the results with a single query?  (Perry Smith <pedz@easesoftware.com>)
Ответы Re: ***SPAM*** Re: Can I get the number of results plus the results with a single query?  (Perry Smith <pedz@easesoftware.com>)
Список pgsql-general
On Monday, August 15, 2022, Perry Smith <pedz@easesoftware.com> wrote:
I’ve been toying with row_number() and then sort by row_number descending and pick off the first row as the total number. 

Use count as a window function.

David J.
 

В списке pgsql-general по дате отправления:

Предыдущее
От: Perry Smith
Дата:
Сообщение: Can I get the number of results plus the results with a single query?
Следующее
От: jian he
Дата:
Сообщение: lateral join with union all