Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2KFiSN24184 for ; Tue, 20 Mar 2001 10:44:28 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 27136; Tue, 20 Mar 2001 07:44:23 -0800 From: "Josh Berkus" Subject: Re: Categories and subcategories To: "Rachel Coin" Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Tue, 20 Mar 2001 07:44:23 -0800 Message-ID: In-Reply-To: <002601c0b11a$8e1e7280$6101a8c0@spidinfo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200103/389 X-Sequence-Number: 2057 Rachel, > I have two tables : the first for categories and the second for > subcategories.I want to get a result like Yahoo! For each category , > the sql > query must return maximum 3 subcategories. I can't use "limit" in a > subquery > because I use Postgresql 7.0. I can think of several ways to do this, but they all depend on what display results you're trying to get. Perhaps you could post some simplified tabledefs, and the result you want to see? -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco