Re: Select first ten of each category?

Поиск
Список
Период
Сортировка
От Yanni Chiu
Тема Re: Select first ten of each category?
Дата
Msg-id e1knn3$h9j$1@sea.gmane.org
обсуждение исходный текст
Ответ на Re: Select first ten of each category?  (Michael Glaesemann <grzm@myrealbox.com>)
Список pgsql-general
Michael Glaesemann wrote:
> Without using UNION, (which would require writing a select statement
> for each category), how would LIMIT allow him to do this for each
> category in a single query?

You're right, it would need a UNION, and a SELECT per category.
So there'd be another SELECT to find all the categories beforehand.

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Truncate and Foreign Key Constraint question
Следующее
От: "Gregory S. Williamson"
Дата:
Сообщение: Re: Truncate and Foreign Key Constraint question