Re: Selecting top N percent of records.

Поиск
Список
Период
Сортировка
От Tim Uckun
Тема Re: Selecting top N percent of records.
Дата
Msg-id AANLkTikznm=5rqtNZ1QH9k3yYtmfv6Cn3puwRuNzT_cK@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Selecting top N percent of records.  (Darren Duncan <darren@darrenduncan.net>)
Список pgsql-general
On Mon, Oct 18, 2010 at 12:53 PM, Darren Duncan <darren@darrenduncan.net> wrote:
> Tim Uckun wrote:
>>
>> Is there a way to select the top 10% of the values from a column?
>>
>> For example the top 10% best selling items where number of sales is a
>> column.
>
> The top 10% would be a variable number of records.  Is that what you want,
> or would you rather, say, just see the top N items?

Yes this is what I want. I don't care how many records I pull up (well
I might want to put a LIMIT on them). I want the top 10%

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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Selecting top N percent of records.
Следующее
От: Tim Uckun
Дата:
Сообщение: Re: Selecting top N percent of records.