From: | Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | "Pgsql-sql(at)postgresql(dot)org" <Pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: How to get a count() where column < ''? |
Date: | 2005-12-04 22:36:50 |
Message-ID: | 1133735810.5560.23.camel@Panoramix |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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(dot)Kraaijeveld(at)Askesis(dot)nl
web: www.askesis.nl
From | Date | Subject | |
---|---|---|---|
Next Message | Patrick JACQUOT | 2005-12-05 10:43:22 | Re: Just 1 in a series... |
Previous Message | Stephan Szabo | 2005-12-04 22:29:16 | Re: How to get a count() where column < ''? |