From: Muhyiddin A.M Hayat <middink@indo.net.id>
To: pgsql-sql@postgresql.org
Subject: Rank
Date: Sat, 1 May 2004 21:30:53 +0800
Message-ID: <002001c42f80$aa192330$4f00a8c0@MIDDINKS> (raw)
Dear All,
I Have below table
id | site_name | point
----+-----------+-------
1 | Site A | 40
2 | Site B | 90
3 | Site D | 22
4 | Site X | 98
Would like to calc that Rank for each site, and look like
id | site_name | point | rank
----+-----------+-------+------
1 | Site A | 40 | 3
2 | Site B | 90 | 2
3 | Site D | 22 | 4
4 | Site X | 98 | 1
What can I do to get result like that
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: middink@indo.net.id
Subject: Re: Rank
In-Reply-To: <002001c42f80$aa192330$4f00a8c0@MIDDINKS>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox