[GRASSLIST:9556] Re: Using SUM() in SELECT db.execute..

Markus Neteler neteler at itc.it
Sat Dec 17 13:41:34 EST 2005


On Sat, Dec 17, 2005 at 04:15:26PM +0000, Luca Casagrande wrote:
> Hi to all guys!
> 
> I have to create a table using this line:
> 
> CREATE TABLE abit_totali AS SELECT cod_comune, SUM( totale_abitanti) from
> abit_cens GROUP BY cod_comune
> 
> Reading SQL guide, I noticed that sum() can't be used in SELECT expression...
> How can I solve this problem (i am using dbf...)?

Luca,

more complex SQL statements can be used for all other backends
than DBF. You may consider to switch to sqlite which is also
locally stored.

Markus
 

> Thx
> Luca
> --
> "Esperienza è il nome che ciascuno da ai suoi errori. (O. Wilde) "
> 
> GENTOO-GIS Development Team
> jabber: casagrande at jabber.linux.it
> 
>  
> 

-- 
Markus Neteler     <neteler itc it>       http://mpa.itc.it
ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18        -       38050 Povo (Trento), Italy




More information about the grass-user mailing list