[thesite] database: content table
Warden, Matt
mwarden at odyssey-design.com
Sat May 26 00:28:20 CDT 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> see, any time you have a group by, the columns in the group by have
> to be in the select list too
>
> select state, sum(cats)
> from census
>
> bzzzzt, this gives an error, you can't have an aggregate function
> without the group by if there's a plain old ordinary column in the
> select list
see, this is what always fux0rz me up. Because, I can do this:
select state, 1
from census
and that will give me
AK 1
OH 1
MD 1
...
You'd think the aggregate function would act the same why. Got a clue
why it doesn't rudy? There's surely a reason I'm not thinking about.
yaknowwhuddimean?
- --
mattwarden
mattwarden.com
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOw8/I3gH0dUmEhrcEQI4tgCg9SCil+vWvrxZErL1lGBEZgT9DGAAn3s7
gtjuSMmtKDbeY4W6DXWShr3f
=twRQ
-----END PGP SIGNATURE-----
More information about the thesite
mailing list