oracle rank() over partition by queries

Started by sharmi Joeover 18 years ago4 messagesgeneral
Jump to latest
#1sharmi Joe
sha.question@gmail.com

Hi,
Is there a way to get the oracle's rank() over partition by queries in
postgresql? For example if I have a query like

Select Col1, Col2, RANK() OVER(PARTITION BY Col1 order by Col3 desc) as rank
from table1

Thanks in advance

#2Rodrigo De León
rdeleonp@gmail.com
In reply to: sharmi Joe (#1)
Re: oracle rank() over partition by queries

On 9/11/07, sharmi Joe <sha.question@gmail.com> wrote:

Hi,
Is there a way to get the oracle's rank() over partition by queries in
postgresql? For example if I have a query like

Select Col1, Col2, RANK() OVER(PARTITION BY Col1 order by Col3 desc) as rank
from table1

Thanks in advance

See:
http://troels.arvin.dk/db/rdbms/#select-top-n

#3Markus Wanner
markus@bluegap.ch
In reply to: sharmi Joe (#1)
Re: oracle rank() over partition by queries

Hello Sharmi Joe,

sharmi Joe wrote:

Is there a way to get the oracle's rank() over partition by queries in
postgresql?

These are known as window functions. AFAIK Gavin Sherry is working on an
implementation for Postgres.

Regards

Markus

#4SHARMILA JOTHIRAJAH
sharmi_jo@yahoo.com
In reply to: Markus Wanner (#3)
Re: oracle rank() over partition by queries

Thanks Markus

Markus Schiltknecht <markus@bluegap.ch> wrote: Hello Sharmi Joe,

sharmi Joe wrote:

Is there a way to get the oracle's rank() over partition by queries in
postgresql?

These are known as window functions. AFAIK Gavin Sherry is working on an
implementation for Postgres.

Regards

Markus

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org/

---------------------------------
Be a better Heartthrob. Get better relationship answers from someone who knows.
Yahoo! Answers - Check it out.