Re: How to get a count() where column < ''? - Mailing list pgsql-sql

From Joost Kraaijeveld
Subject Re: How to get a count() where column < ''?
Date
Msg-id 1133735810.5560.23.camel@Panoramix
Whole thread Raw
In response to How to get a count() where column < ''?  (Joost Kraaijeveld <J.Kraaijeveld@Askesis.nl>)
List 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.Kraaijeveld@Askesis.nl
web: www.askesis.nl 




pgsql-sql by date:

Previous
From: Jim Johannsen
Date:
Subject: Re: How to get a count() where column < ''?
Next
From: Stephan Szabo
Date:
Subject: Re: How to get a count() where column < ''?