X-Original-To: pgsql-sql@postgresql.org Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 27CCB476D1A for ; Fri, 7 Mar 2003 01:11:04 -0500 (EST) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 7B981D621; Thu, 6 Mar 2003 22:11:03 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 715365C0A; Thu, 6 Mar 2003 22:11:03 -0800 (PST) Date: Thu, 6 Mar 2003 22:11:03 -0800 (PST) From: Stephan Szabo To: Rajesh Kumar Mallah Cc: Tomasz Myrta , Subject: Re: sql question regarding count(*) In-Reply-To: <200303071053.06820.mallah@trade-india.com> Message-ID: <20030306220603.P87448-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200303/175 X-Sequence-Number: 12215 On Fri, 7 Mar 2003, Rajesh Kumar Mallah wrote: > Tomasz did you notice the two queries are totally differet on different > tables? A count() on a non-grouped table returns 1 row. A grouped table returns 1 row per group. If there are no groups, no rows are returned. If the groups are filtered by a having clause, it might also return no rows.