title: Sum on multiple columns with Activerecord
body: <p>I am new to Activerecord. I want to do sum on multiple columns of a model Student. My model student is like following:</p>
  
  <pre><code> class Student &lt; ActiveRecord::Base
     attr_accessible :class, :roll_num, :total_mark, :marks_obtained, :section
   end
  </code></pre>
  
  <p>I want something like that:</p>
  
  <pre><code> total_marks, total_marks_obtained = Student.where(:id=&gt;student_id).sum(:total_mark, :marks_obtained)
  </code></pre>
  
  <p>But it is giving following error. </p>
  
  <pre><code>NoMethodError: undefined method `except' for :marks_obtained:Symbol
  </code></pre>
  
  <p>So I am asking whether I have to query the model two times for the above, i.e. one to find total marks and another to find marks obtained. </p>