Re: Return 30% of results? - Mailing list pgsql-general

From nick
Subject Re: Return 30% of results?
Date
Msg-id 8e09b25e-4364-4cef-8a81-f0bc13864f0d@e4g2000prn.googlegroups.com
Whole thread Raw
In response to Return 30% of results?  (Nick <nboutelier@gmail.com>)
Responses Re: Return 30% of results?  (David Fetter <david@fetter.org>)
Re: Return 30% of results?  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On Sep 18, 3:40 pm, spam_ea...@gmx.net (Thomas Kellerer) wrote:
> 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
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general

Yeah, im actually not using 8.4. Any other alternatives?

pgsql-general by date:

Previous
From: chris_watcher
Date:
Subject: Re: Regarding initdb & pg_ctl
Next
From: Merlin Moncure
Date:
Subject: Re: haversine formula with postgreSQL