Re: Return 30% of results?

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Return 30% of results?
Дата
Msg-id h9128b$589$1@ger.gmane.org
обсуждение исходный текст
Ответ на Return 30% of results?  (Nick <nboutelier@gmail.com>)
Список pgsql-general
Nick wrote on 18.09.2009 23:31:
> Is there a way to return a percentage of the rows found? I tried
> window functions but get an error...
>
> ERROR:  syntax error at or near "OVER"
>
> SELECT id, cume_dist FROM (
>   SELECT id, cume_dist() OVER (ORDER BY id) FROM employees
> ) s
> WHERE cume_dist < 0.3
>
Works for me. Are you sure you are using Postgrs 8.4?
(Windowing functions are not available in earlier versions)

Regards
Thomas

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

Предыдущее
От: Nick
Дата:
Сообщение: Return 30% of results?
Следующее
От: Clodoaldo Neto
Дата:
Сообщение: MD5 sum mismatch in source rpm