From: Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>
To: Stephan Szabo <sszabo@megazone.bigpanda.com>
Cc: Pgsql-sql@postgresql.org <Pgsql-sql@postgresql.org>
Subject: Re: How to get a count() where column < ''?
Date: Sun, 04 Dec 2005 23:36:50 +0100
Message-ID: <1133735810.5560.23.camel@Panoramix> (raw)
In-Reply-To: <20051204142347.R57404@megazone.bigpanda.com>
References: <1133730772.5560.8.camel@Panoramix>
<20051204133233.O57404@megazone.bigpanda.com>
<1133732596.5560.11.camel@Panoramix>
<20051204142347.R57404@megazone.bigpanda.com>
Hi Stephan,
> A query without a group by, in other words one on which the count is done
> over the entire set of rows that pass the where clause.
OK.
> I believe
> select count(*) from prototype.customers, prototype.addresses where
> customers.contactaddress = addresses.objectid and zipCode < '2716BN';
> will work and give you an overall count.
The working query (I did not count if the answer was correct ;-))
appears to be:
SELECT COUNT(zipcode) FROM prototype.customers, prototype.addresses
WHERE
customers.contactaddress = addresses.objectid AND zipCode < '1234ab'
--
Groeten,
Joost Kraaijeveld
Askesis B.V.
Molukkenstraat 14
6524NB Nijmegen
tel: 024-3888063 / 06-51855277
fax: 024-3608416
e-mail: J.Kraaijeveld@Askesis.nl
web: www.askesis.nl
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: J.Kraaijeveld@Askesis.nl, sszabo@megazone.bigpanda.com
Subject: Re: How to get a count() where column < ''?
In-Reply-To: <1133735810.5560.23.camel@Panoramix>
* 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