active record

count
Client.count(:age)

平均值

Client.average(“orders_count”)
 

最小值

Client.minimum(“age”)

最大值

Client.maximum(“age”)

总和

Client.sum(“orders_count”)
posted on 2014-04-03 16:06  qinyan20  阅读(106)  评论(0编辑  收藏  举报