equivalent of oracle rank() in postgres

From: "Chandan_Kumaraiah" <Chandan_Kumaraiah(at)satyam(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: equivalent of oracle rank() in postgres
Date: 2005-03-21 07:08:05
Message-ID: 2EB549AAAFEA264FA926269A5BD5E9EB14657F@certsrv.satyam.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

Jus wanted the equivalent for rank() as in tis example..

SELECT *
FROM (
SELECT employee_id, last_name, salary,
RANK() OVER (ORDER BY salary DESC) EMPRANK
FROM employees)
WHERE emprank = 3;

Rgds,

Chandan

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2005-03-21 08:02:05 Re: Trigger with parameters
Previous Message Jonathan Daugherty 2005-03-21 05:08:20 Re: tablename as function parameter