摘要: SpecialGroup.group(:special_type).countselect special_type,count(*) from special_groups group by special_type SpecialGroup.group(:special_type).count( 阅读全文
posted @ 2018-06-12 11:00 吕兴杰 阅读(1016) 评论(0) 推荐(0)
摘要: Table.select("DISTINCT name").map(&:name) : DISTINCT name去重查询name Table.active.map{|x| x.name}.uniq :查询出来后做去重操组 阅读全文
posted @ 2018-06-12 10:14 吕兴杰 阅读(485) 评论(0) 推荐(0)