select id,nick_name,subject_id,count from
(
select id,nick_name,subject_id,count(id) as count from user_info group by subject_id
) as a order by count desc
select id,nick_name,subject_id,count from
(
select id,nick_name,subject_id,count(id) as count from user_info group by subject_id
) as a order by count desc