Re: sum of row values..

From: Alex Pilosov <alex(at)pilosoft(dot)com>
To: Fabrizio Mazzoni <fabrizio(at)macron(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: sum of row values..
Date: 2001-06-20 18:24:31
Message-ID: Pine.BSO.4.10.10106201424160.21174-100000@spider.pilosoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

select sum(first), sum(first*2) from test

=alex

On Wed, 13 Jun 2001, Fabrizio Mazzoni wrote:

> hi all..
> i have a big problem..why is this impossible in postgresql:
>
> table test: (1 column)
>
> first
> ------
> 1
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9
>
>
> select first as value, value*2 as result from test;
>
> How can i accomplish this?? I need it for a very big table that will use
> also functions in it..
>
> Thanks..
>
> fabrizio(at)macrongolf(dot)com
> http://macrongolf.com
> http://eteampoint.com
> http://macron.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marc SCHAEFER 2001-06-20 18:24:58 Re: What do you do when...? A schema Question
Previous Message Alex Pilosov 2001-06-20 18:23:49 Re: Log files, how to rotate properly