Re: sql question regarding count(*) - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: sql question regarding count(*)
Date
Msg-id 20030306220603.P87448-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: sql question regarding count(*)  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Responses Re: sql question regarding count(*)  (Rajesh Kumar Mallah <mallah@trade-india.com>)
List pgsql-sql
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.



pgsql-sql by date:

Previous
From: jasiek@klaster.net
Date:
Subject: Re: Cancelling Queries
Next
From: Rajesh Kumar Mallah
Date:
Subject: Re: sql question regarding count(*)