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

From David Fetter
Subject Re: Return 30% of results?
Date
Msg-id 20090918235854.GA22359@fetter.org
Whole thread Raw
In response to Re: Return 30% of results?  (Martin Gainty <mgainty@hotmail.com>)
List pgsql-general
On Fri, Sep 18, 2009 at 07:54:30PM -0400, Martin Gainty wrote:
>
> //Display the top 40 % of rows in BB_DEPARTMENT
>
> SQL> select ROWNUM,ID FROM EMPLOYEES WHERE ROWNUM < .3*(SELECT COUNT(ID) FROM BB
> _DEPARTMENT) GROUP BY ROWNUM,ID;
>
>     ROWNUM
> ----------
>          1
> HTH
> Martin Gainty

That's Oracle, not PostgreSQL.  Are you really trying to help here?

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

pgsql-general by date:

Previous
From: Martin Gainty
Date:
Subject: Re: Return 30% of results?
Next
From: Clodoaldo Neto
Date:
Subject: Re: MD5 sum mismatch in source rpm