Received: from cti13.citenet.net (cti13.citenet.net [206.123.38.75]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA29826 for ; Tue, 18 Apr 2000 10:25:48 -0400 (EDT) (envelope-from dziablo@lords.com) Received: from zack (g92-180.citenet.net [209.41.140.180]) by cti13.citenet.net (8.9.3/8.9.1) with SMTP id KAA70678 for ; Tue, 18 Apr 2000 10:22:57 -0400 (EDT) From: "Ed" To: "pgsql sql" Subject: One query for two information... Date: Tue, 18 Apr 2000 10:26:25 -0400 Message-ID: <001d01bfa942$13d93180$b48c29d1@citenet.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200004/183 Hi, I have a table containing only a bool filed. I would like to know how many records there is an on many ar true. Is there something I could do to get both answer in only one query... like : select count(*), sum(bool_col) from tablename but there is no sum(bool) function that would add 1 if it's true and 0 if it's false... ;( Any idea? Frédéric Boucher dziablo@lords.com