Received: from postgresql.org.org (webmail.postgresql.org [216.126.85.28]) by postgresql.org (8.11.3/8.11.1) with SMTP id f3A23k850160 for ; Mon, 9 Apr 2001 22:03:46 -0400 (EDT) (envelope-from pgsql-sql-owner@postgresql.org) Received: from news.tht.net (news.hub.org [216.126.91.242]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f39NP2879718 for ; Mon, 9 Apr 2001 19:25:02 -0400 (EDT) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.11.1/8.11.1) id f39NHu016778 for pgsql-sql@postgresql.org; Mon, 9 Apr 2001 19:17:56 -0400 (EDT) (envelope-from news) From: Wei Weng X-Newsgroups: comp.databases.postgresql.sql Subject: Sorting and then... Date: Mon, 9 Apr 2001 19:22:52 -0400 Organization: KenCast Inc. Lines: 13 Message-ID: <9atfv4$gb0$1@news.tht.net> Reply-To: wweng@pobox.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: scrappy@hub.org User-Agent: KNode/0.4 To: pgsql-sql@postgresql.org X-Archive-Number: 200104/128 X-Sequence-Number: 2475 Suppose I have a table create table test ( id integer, name text ); And I want to get the names of the largest 10 "id"s. How can I do that in sql? Thanks!