Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 64ECE633318 for ; Tue, 16 Jun 2009 19:54:19 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 93511-04 for ; Tue, 16 Jun 2009 19:54:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f195.google.com (mail-qy0-f195.google.com [209.85.221.195]) by mail.postgresql.org (Postfix) with ESMTP id F2E7D632894 for ; Tue, 16 Jun 2009 19:54:17 -0300 (ADT) Received: by qyk33 with SMTP id 33so5835452qyk.15 for ; Tue, 16 Jun 2009 15:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=4ntcKMS/LN81laILhbm/w+bHlQyMAY8p1oC/1XOifQ0=; b=vkfSC7a0Sc3OngrErl1lwQUt/69hZUZGtASz1Ng10963869jomSaBj6ZIjAIUa5rFf kgAQC3rDAmBow3Z4Q0jZNd8keDtRa5me9+v6Qhu0P7cHpdpoFRh20BwPGbC3t/H7HpZl vWBZU4KPEn58mxKHa1p4zEIE7CsabcB1dnMCI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=BidatkrdIjxLpv4nT0KxwW+8q8e3VpU0/9c9E79PaUaMsYQ6VgTH8CsEvmYF8qYKmn WMhcV/doDcXciXBFnFtNeDnQoZp1WW9zMq3xsgr8JFLO+9TLjheqLKJ65K4BystJiRj2 VxZD26d+XyqAqOhlIwHezF8ltlWBaKJLhApMc= MIME-Version: 1.0 Received: by 10.220.90.209 with SMTP id j17mr6383779vcm.61.1245192856537; Tue, 16 Jun 2009 15:54:16 -0700 (PDT) In-Reply-To: <00E9117C300386479B7E2F3CDBF798F605534293@pothia.disanet.disa-u.mil> References: <4A3807CF.90109@consumercontact.com> <396486430906161425i1cb7949enff5443cc2043805a@mail.gmail.com> <4A38114B.7090106@gmail.com> <00E9117C300386479B7E2F3CDBF798F605534293@pothia.disanet.disa-u.mil> Date: Tue, 16 Jun 2009 15:54:16 -0700 Message-ID: <396486430906161554m4024a2bfuc7abad514f1e3dd6@mail.gmail.com> Subject: Re: left outer join on more than 2 tables? (UNCLASSIFIED) From: Richard Broersma To: "Hall, Crystal M CTR DISA JITC" Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/81 X-Sequence-Number: 32686 On Tue, Jun 16, 2009 at 2:52 PM, Hall, Crystal M CTR DISA JITC wrote: > Maybe I am way of base here, but I see a reference to region in this > query. =A0However, I think count(cm.id) is correct because some would hav= e > a count of 0. =A0Count(*) would produce counts when there are no > complaints. (If I understand the logic, again, I am VERY new to this) Here is a very good website to visit to get practice with SQL using Postgre= SQL. http://www.sqlzoo.net/select_group_by If you look up at the upper right corner of the web-page, you can select PostgreSQL are your RDBMS (other flavors are available also). --=20 Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug