[HACKERS] select avanced
I have the following table: Objeto Valor ob1 10 ob1 20 ob2 50 ob2 10 ob3 50 With the following command: select distinct Objeto, sum(valor) from tb group by Objeto; I have to return: Objeto Valor ob1 30 ob2 60 ob3 50 What you need to do is add ob2 and ob3 in one field, Leading me the following table: Objeto Valor ob1 30 ob2e3 110 It can do this only with Select? ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] select avanced
[EMAIL PROTECTED] wrote: I have the following table: The hackers list is for development of the PostgreSQL database itself. Please try reposting on the general or sql mailing lists. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings