charles kline <[EMAIL PROTECTED]> wrote:
> Oh I see... so how would I get balance_amt to have a running balance?

- You can calculate it in your application
- You can run an additional query
- From version 4.1.1 you can use WITH ROLLUP modifier with GROUP BY clause to get 
summary info:
        http://www.mysql.com/doc/en/GROUP-BY-Modifiers.html

> 
> Thanks,
> Charles
> 
> On Mar 3, 2004, at 11:20 AM, Victoria Reznichenko wrote:
> 
>> charles kline <[EMAIL PROTECTED]> wrote:
>>> Hi all,
>>>
>>> Just trying to figure out why the SUM() in this query is not returning
>>> the sum, but is returning the same value that signed_amt contains.
>>> Anyone have a clue? Thanks for any help :)
>>>
>>> Here are the results I am getting:
>>>
>>> id | signed_amt | balance_amt | entry_dtm
>>> ---+------------+-------------+-----------
>>>  7 |        -20 |         -20 | 1078117200
>>>  7 |          3 |           3 | 1078263566
>>
>> SUM() function works fine in your query and it returns sum per group 
>> (u.id, t.entry_dtm, and signed_amt).


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to