Mysql
 sql >> Database >  >> RDS >> Mysql

Utilizzo di mysql COUNT per contare più colonne

select name_of_follower, 
       count(name_of_follower) 
  from ( select name as name_of_follower 
          from abc 
         union all 
        select follower as name_of_follower  
          from abc
       ) t
 group by t.name_of_follower 
 order by count(name_of_follower) desc