Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D1A296340D1 for ; Tue, 16 Jun 2009 19:50:24 -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 93043-01 for ; Tue, 16 Jun 2009 19:50:23 -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 5003B633E29 for ; Tue, 16 Jun 2009 19:50:23 -0300 (ADT) Received: by qyk33 with SMTP id 33so5833247qyk.15 for ; Tue, 16 Jun 2009 15:50:22 -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=ZUVazfAcUeWMvN2V0VFhyotecKhGW597E9pJLE0C/04=; b=WDp2zpAfKLYnOSlAZN9ZamOViiD5o1Luqo7byY7cKT3Ro1iZAapQjxmfTGza5go/06 0oCxNc9/Ses+I/8Bw4H9sAlp2qk3JyJlsAdRNJ6pK3vQHwk1DoJC5YB5uBzmF7xhiW2b oEX4mIwdhTOSBDXhODetW9VvTpxCNCGfjNz8Y= 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=A63P2sFmghFMBQiDtHIdfzw6K1MIyIOVaMHX21pdGvYZz9aCxOJ+iMZikeNZruCpWe 4pW8COPD0j6JXUD6KHCn22V50zOLlOpFBYI/6txtsj1+Nt4CNzl3NlkcUqe/q1b6iQp2 JGcYyr0dnxby4K3WvZKbFuwq5rSP1vqfFy98s= MIME-Version: 1.0 Received: by 10.220.95.194 with SMTP id e2mr6183818vcn.60.1245192621734; Tue, 16 Jun 2009 15:50:21 -0700 (PDT) In-Reply-To: <4A38114B.7090106@gmail.com> References: <4A3807CF.90109@consumercontact.com> <396486430906161425i1cb7949enff5443cc2043805a@mail.gmail.com> <4A38114B.7090106@gmail.com> Date: Tue, 16 Jun 2009 15:50:21 -0700 Message-ID: <396486430906161550v30befebelcfddd58ebc4b4f2d@mail.gmail.com> Subject: Re: left outer join on more than 2 tables? From: Richard Broersma To: Rob Sargent 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/80 X-Sequence-Number: 32685 On Tue, Jun 16, 2009 at 2:40 PM, Rob Sargent wrote: > Is there a city without a reference to region? I don't know, but the OP wanted to know complaints by region. > =A0And wouldn't you want to count(cm.id)? Count(cm.id) and Count(*) produce the same result. But I like Count(*) more since it helps to correctly express the idea that we are counting rows per group and not cm.id(s) per group. --=20 Regards, Richard Broersma Jr. Visit the Los Angeles PostgreSQL Users Group (LAPUG) http://pugs.postgresql.org/lapug