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 D2419D1EAC1 for ; Sat, 1 May 2004 10:33:24 -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 87616-05 for ; Sat, 1 May 2004 10:33:06 -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 4B39FD1EB48 for ; Sat, 1 May 2004 10:32:59 -0300 (ADT) Received: (qmail 7750 invoked from network); 1 May 2004 20:33:01 +0700 Received: from smtp.indo.net.id (202.159.32.81) by smtp-1.indo.net.id with SMTP; 1 May 2004 20:33:01 +0700 Received: (qmail 5138 invoked from network); 1 May 2004 20:33:01 +0700 Received: from unknown (HELO smtp.surabaya.indo.net.id) (202.159.51.117) by smtp.indo.net.id with SMTP; 1 May 2004 20:33:01 +0700 Received: from smtp [202.159.51.117] by smtp.surabaya.indo.net.id (SMTPD32-7.10) id AA0511D008E; Sat, 01 May 2004 20:37:25 +0800 Received: FROM MIDDINKS BY smtp ; Sat May 01 20:37:23 2004 +0800 Message-ID: <002001c42f80$aa192330$4f00a8c0@MIDDINKS> From: "Muhyiddin A.M Hayat" To: Subject: Rank Date: Sat, 1 May 2004 21:30:53 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01C42FC3.94983DF0" 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/27 X-Sequence-Number: 17741 This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C42FC3.94983DF0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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_001B_01C42FC3.94983DF0 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_001B_01C42FC3.94983DF0--