Search Postgresql Archives

Return 30% of results?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux