From: Phlip Date: 2008-08-16T00:42:08+09:00 Subject: Re: Need to get average of specific fields in MySQL jackster the jackle wrote: > device = Pix.find(:all, :conditions => "pixes.ipadd = '10.1.1.1'") > device.each do |line| > puts line.current_connection_count > end According to the very first cite at... http://www.google.com/search?q=activerecord+average ...it should be: average = Pix.average(:current_connection_count, :conditions => "ipadd = '10.1.1.1'") Please consider http://groups.google.com/group/rubyonrails-talk/ for RoR questions. This group is for old-timers who missed the RoR boat, and questions about it make us cranky here. (-: -- Phlip