Select max(draw)

how would you do this in active record

SELECT max(draw) FROM draws

cheers

dion

SELECT max(draw) FROM draws

Draw.maximum(:draw)

awesome

cheers guy

found it under

ActiveRecord::Calculations::ClassMethods

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs