Skip site navigation (1) Skip section navigation (2)

Analytic Functions

From: "Cristian Custodio" <crstian(at)terra(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Analytic Functions
Date: 2003-02-11 13:44:39
Message-ID: 002601c2d1d3$bdf12f80$fb01a8c0@ttcristian (view raw or flat)
Thread:
Lists: pgsql-general
Does anybody know tell me whether the PG have 
analytic functions like the LEAD of Oracle?

I would like to create a SELECT where I can get
data of prior row like following example:

LAST_NAME  HIRE_DATE Date of prior row
---------  --------- ---------
Raphaely   07-DEC-94 18-MAY-95
Khoo       18-MAY-95 24-JUL-97
Tobias     24-JUL-97 24-DEC-97
Baida      24-DEC-97 15-NOV-98
Himuro     15-NOV-98 10-AUG-99
Colmenares 10-AUG-99

On Oracle I  can also to make this using ROWNUM.

Does anybody already need to make this 
or have any soluction about it...

Thanks,

Cristian

pgsql-general by date

Next:From: Tony GrantDate: 2003-02-11 14:19:50
Subject: Re: PostgreSQL x Oracle
Previous:From: Viacheslav N TararinDate: 2003-02-11 13:41:24
Subject: Rights for views.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group