Can you sum a few columns at a time?
x =Calc.find(:all, :select => “sum(amt1) amt1, sum(amt2) amt2”
:conditions => [“where date > ?”, date] )
The sql seems to function properly, but I wasn’t able to grab the
values. These just failed
I tried changing up the query to use
sum(amt1) as amt1
sum(amt1) as ‘amt1’
but none worked.
undefined method `amt1’ for [#<;Calc:0x2ac605ec9508
the “amt”=> 2 are correct, but I just cant seem to access the value