ActiveRecord query types, row, column, count