Re: selecting a column average into table

Поиск
Список
Период
Сортировка
От James McMurry
Тема Re: selecting a column average into table
Дата
Msg-id 002b01c0f371$f2318700$05000100@dorkbox
обсуждение исходный текст
Ответ на selecting a column average into table  ("Shawhan, Douglas (GEAE, GECC)" <douglas.shawhan@ae.ge.com>)
Список pgsql-novice
This should work:

-- don't have to create the table if you already have one.
create table foo (
    answer float;
)

insert into foo (answer) select avg(numbers) from nebbish;

JM

----- Original Message -----
From: "Shawhan, Douglas (GEAE, GECC)" <douglas.shawhan@ae.ge.com>
To: <pgsql-novice@postgresql.org>
Sent: Tuesday, June 05, 2001 12:19 PM
Subject: [NOVICE] selecting a column average into table


> Weeeellll...
>
> I wish to select the average of a column populated with integers into a
> table
>
> I have established in my mind that:
>
> select avg(nebbish.numbers) into shebang from numbers ;
>
> ain't going to cut it. Can anyone point me in the right direction?
>
> d
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>


В списке pgsql-novice по дате отправления:

Предыдущее
От: "Nabil Sayegh"
Дата:
Сообщение: Re: How do I start postmaster with -i for tcp-ip
Следующее
От: Tom Lane
Дата:
Сообщение: Re: AW: FATAL ERROR