SUM agregate

Поиск
Список
Период
Сортировка
От David Horwitz
Тема SUM agregate
Дата
Msg-id E13ndkc-0005ER-00@mail3.uct.ac.za
обсуждение исходный текст
Ответ на Re: data dictionary?  (Beth Gatewood <bethg@mbt.washington.edu>)
Список pgsql-novice
Hi All,

I'm having problems with the sum() agregate function. Simply put I
want to query a table and return grouped sum agregates. The SQL im
using is:

SELECT PortfolioCurrValue.MID, Sum(PortfolioCurrValue.CurrValue) AS
PortfolioValue
FROM PortfolioCurrValue
GROUP BY PortfolioCurrValue.MID;


currValue conatins large integers ( the largest is curently
195680000) the largest sum should be un the region of 199905000. The
query returns a number of responces per 'mid' (not just the sum of
the values per mid). Infact  it apears to return a row per value

Converting the data-type to int8 seems to have no afect on the error.

Anyadvise?

Thanks

David Horwitz




****************************************************
David Horwitz                  University of Cape Town
IT Officer                     Private Bag
Multimedia Education Group     Rondebosch
                               7701
dhorwitz@its.uct.ac.za         SOUTH AFRICA
Tel:+27 21 650 3841          Fax:+27 21 650 5045
http://www.meg.uct.ac.za
*************************************************



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

Предыдущее
От: Vic
Дата:
Сообщение: Re: It's a bug???? 8-()
Следующее
От: "Scott Muir"
Дата:
Сообщение: Using external Apps from inside pgsql.