sum of numeric column
От | avi Singh |
---|---|
Тема | sum of numeric column |
Дата | |
Msg-id | CAETvN5giG3jerWi_A+n6pRBjUzMm5CU5Pu=axKxV88QFuHQcxg@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: sum of numeric column
|
Список | pgsql-general |
I have a table structure and want to do a sum of column type i.e numeric. How can I do it ? when i try sum function i get this error
ERROR: function sum(numeric[]) does not exist
Can anyone please help me with this ?
Column | Type | Collation | Nullable | Default
----------------------------+--------------------------+-----------+----------+---------
grid_id | bigint | | not null |
as_of_date | date | | not null |
cell_id | bigint | | not null |
last_event_timestamp_local | timestamp with time zone | | |
last_event_id | bigint | | |
column_id | bigint | | |
column_name | character varying(50) | | |
row_id | bigint | | |
data_type_id | smallint | | |
data_numeric | numeric[] | | |
data_string | character varying[] | | |
----------------------------+--------------------------+-----------+----------+---------
grid_id | bigint | | not null |
as_of_date | date | | not null |
cell_id | bigint | | not null |
last_event_timestamp_local | timestamp with time zone | | |
last_event_id | bigint | | |
column_id | bigint | | |
column_name | character varying(50) | | |
row_id | bigint | | |
data_type_id | smallint | | |
data_numeric | numeric[] | | |
data_string | character varying[] | | |
e.g. of values in numeric type column
data_numeric
--------------
{2.0}
{1.0}
--------------
{2.0}
{1.0}
Regards
Prabhjot
В списке pgsql-general по дате отправления: