Received: from www.e-cameroun.com (63-123-228-200.douala1.com [63.123.228.200] (may be forged)) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2KGmSN33757 for ; Tue, 20 Mar 2001 11:48:29 -0500 (EST) (envelope-from rachel@derniere-minute.org) Received: from toto (unknown [192.168.1.97]) by www.e-cameroun.com (Postfix) with SMTP id BD22A32612 for ; Tue, 20 Mar 2001 17:52:26 +0100 (WAT) Message-ID: <00c901c0b15e$5b7dff00$6101a8c0@spidinfo.com> From: "Rachel Coin" To: Subject: Categories and subcategories : more details Date: Tue, 20 Mar 2001 17:53:38 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200103/390 X-Sequence-Number: 2058 > 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. Examples : table CATEG : ida categ 1 X 2 Y 3 Z table SUBCATEG : idb subcateg ida 1 x1 1 2 x2 1 3 x3 1 4 x4 1 5 y1 2 6 y2 2 7 z1 3 I 'd like to obtain a table with maximum 2 subcateg per categ : table result : categ subcateg X x1 X x2 Y y1 Y y2 Z z1 any help? Regards, Rachel