I have a table called poll_options, and the column ‘count’
I need the sum of that for a specific poll id.
Not quite sure how to get that.
Thanks,
Joe
I have a table called poll_options, and the column ‘count’
I need the sum of that for a specific poll id.
Not quite sure how to get that.
Thanks,
Joe
PollOption.sum(:count).where(poll_id: ‘123abc’)
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs