pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Rajesh Kumar Mallah <mallah@trade-india.com>
Cc: Tomasz Myrta <jasiek@klaster.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: sql question regarding count(*)
Date: Thu, 6 Mar 2003 22:11:03 -0800 (PST)
Message-ID: <20030306220603.P87448-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <200303071053.06820.mallah@trade-india.com>

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.




view thread (7+ messages)  latest in thread

Message-ID: <20030306220603.P87448-100000@megazone23.bigpanda.com>
Permalink:  ../20030306220603.P87448-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030306220603.P87448-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, mallah@trade-india.com, jasiek@klaster.net
  Subject: Re: sql question regarding count(*)
  In-Reply-To: <20030306220603.P87448-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox