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 21:43:16 |
Message-ID: | 1133732596.5560.11.camel@Panoramix |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi Stephan,
On Sun, 2005-12-04 at 13:33 -0800, Stephan Szabo wrote:
> > SELECT COUNT(customers.objectid) FROM prototype.customers,
> > prototype.addresses
> > WHERE
> > customers.contactaddress = addresses.objectid
> > AND
> > zipCode < '2716BN'
> > ORDER By zipCode, houseNumber
> In a non-grouped query like the above, I don't think that the order by is
> meaningful. You only get one row back anyway without a group by, and
> there's no single zipCode or houseNumber to associate with the row.
>
What do you mean by a non-grouped query? The query below gives the same
error:
SELECT zipcode, COUNT(*) FROM prototype.customers, prototype.addresses
WHERE
customers.contactaddress = addresses.objectid
AND
zipCode < '2716BN'
--
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 | Jim Johannsen | 2005-12-04 22:17:40 | Re: How to get a count() where column < ''? |
Previous Message | Stephan Szabo | 2005-12-04 21:33:56 | Re: How to get a count() where column < ''? |