SpecialGroup.group(:special_type).count
select special_type,count(*) from special_groups group by special_type
SpecialGroup.group(:special_type).count(:sno)
select special_type,count(sno) from special_groups group by special_type
SpecialGroup.group(:special_type).count("distinct sno")
select special_type,count(distinct sno) from special_groups group by special_type
SpecialGroup.group(:user_id, :name).sum(:count)
SELECT SUM(`special_groups`.`count`) AS sum_count, `special_groups`.`user_id` AS special_groups_user_id, `special_groups`.`name` AS special_groups_name FROM `special_groups` GROUP BY `special_groups`.`user_id`, `special_groups`.`name