How to get a count() where column < ''?

Поиск
Список
Период
Сортировка
От Joost Kraaijeveld
Тема How to get a count() where column < ''?
Дата
Msg-id 1133730772.5560.8.camel@Panoramix
обсуждение исходный текст
Ответы Re: How to get a count() where column < ''?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-sql
Hi,

I want the number of customers that have a zipCode smaller tha a given
value. The foolowing query doe snot work : I get an error (ERROR:
column "addresses.zipcode" must appear in the GROUP BY clause or be used
in an aggregate function) and I do not know how to solve it.

SELECT COUNT(customers.objectid) FROM prototype.customers,
prototype.addresses 
WHERE 
customers.contactaddress = addresses.objectid 
AND 
zipCode < '2716BN' 
ORDER By zipCode, houseNumber

Anyone an idea?

TIA


-- 
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 по дате отправления:

Предыдущее
От: Theodore Petrosky
Дата:
Сообщение: Re: question using 'between' in a sql query
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: How to get a count() where column < ''?