X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 745F953654 for ; Thu, 31 Mar 2005 09:05:15 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43021-04 for ; Thu, 31 Mar 2005 08:05:09 +0000 (GMT) Received: from quasar.skima.is (quasar.skima.is [212.30.200.205]) by svr1.postgresql.org (Postfix) with ESMTP id E963853778 for ; Thu, 31 Mar 2005 09:05:07 +0100 (BST) Received: from gnari ([157.157.159.208] [157.157.159.208]) by quasar.skima.is with ESMTP; Thu, 31 Mar 2005 08:05:07 Z Subject: Re: A SQL Question About distinct, limit, group by, having, From: Ragnar =?ISO-8859-1?Q?Hafsta=F0?= To: Lin Kun Hsin Cc: pgsql-sql In-Reply-To: <20050331050120.M45373@cyut.edu.tw> References: <20050331050120.M45373@cyut.edu.tw> Content-Type: text/plain Date: Thu, 31 Mar 2005 08:05:24 +0000 Message-Id: <1112256324.3038.1.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.0.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/409 X-Sequence-Number: 20888 On Thu, 2005-03-31 at 13:14 +0800, Lin Kun Hsin wrote: > below is the sql schema. i hope it will help. > > i want the top 3 score students in every class this has been discussed before. a quick google gives me: http://archives.postgresql.org/pgsql-sql/2004-04/msg00067.php gnari