X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5E5B3D1EA09 for ; Sat, 1 May 2004 15:24:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 57151-09 for ; Sat, 1 May 2004 15:24:27 -0300 (ADT) Received: from smtp-1.indo.net.id (smtp-1.indo.net.id [202.159.32.91]) by svr1.postgresql.org (Postfix) with SMTP id 236ECD1EBAA for ; Sat, 1 May 2004 15:24:23 -0300 (ADT) Received: (qmail 32636 invoked from network); 2 May 2004 01:24:20 +0700 Received: from smtp.indo.net.id (202.159.32.81) by smtp-1.indo.net.id with SMTP; 2 May 2004 01:24:20 +0700 Received: (qmail 24061 invoked from network); 2 May 2004 01:24:21 +0700 Received: from unknown (HELO smtp.surabaya.indo.net.id) (202.159.51.117) by smtp.indo.net.id with SMTP; 2 May 2004 01:24:21 +0700 Received: from smtp [202.159.51.117] by smtp.surabaya.indo.net.id (SMTPD32-7.10) id AE4FA770062; Sun, 02 May 2004 01:28:47 +0800 Received: FROM MIDDINKS BY smtp ; Sun May 02 01:28:40 2004 +0800 Message-ID: <003e01c42fa9$5677b240$4f00a8c0@MIDDINKS> From: "Muhyiddin A.M Hayat" To: Subject: Rank Date: Sun, 2 May 2004 02:22:37 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003B_01C42FEC.560F09F0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.5 tagged_above=0.0 required=5.0 tests=HTML_40_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200405/30 X-Sequence-Number: 17744 This is a multi-part message in MIME format. ------=_NextPart_000_003B_01C42FEC.560F09F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable =20 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 ------=_NextPart_000_003B_01C42FEC.560F09F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Dear All,
 
I Have below table
 
 id | site_name | point
----+-----------+-------
  1 |= Site=20 A    |    40
  2 | Site=20 B    |    90
  3 | Site=20 D    |    22
  4 | Site=20 X    |    98
 
 Would like to calc that Rank for each site, and look like
 
 
 
 id | site_name | point |=20 rank
----+-----------+-------+------
  1 | Site A  &nb= sp;=20 |    40 |    3
  2 | Site=20 B    |    90 |    2
&n= bsp;=20 3 | Site D    |    22=20 |    4
  4 | Site X   =20 |    98 |    1
 
What can I do to get result like=20 that
------=_NextPart_000_003B_01C42FEC.560F09F0--