Received: from lucas.mandanet.ch (lucas.mandanet.ch [195.15.14.8]) by hub.org (8.8.8/8.7.5) with SMTP id EAA09914 for ; Wed, 12 Aug 1998 04:10:33 -0400 (EDT) Received: from thomas.mandanet.ch (thomas.mandanet.ch [195.15.14.68]) by lucas.mandanet.ch (NTMail 3.02.13) with ESMTP id sa010262 for ; Wed, 12 Aug 1998 10:15:52 +0100 Message-ID: <35D14F37.13118C6@mandanet.ch> Date: Wed, 12 Aug 1998 10:15:52 +0200 From: Jerome Knobl Organization: MandaNET X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Subquery problems Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello, I'm trying to build some subquery, and it don't works like I want. I try the following query : select distinct pseudo, (select count(ref) from questions where questions.refpseudo=pseudos.refold) as xxx from pseudos; That query work well on MSAccess, but I have the following error on postgres : ERROR: parser: parse error at or near "select" I must maybe using an other method. I'm want to optain in a simple query to list some name of my table pseudos and to see the number of occurency in the table questions. Thank. Jérôme Knöbl, Switzerland