select a.id,a.ssmz,(select count(ssmz) from shop_tourist_key b where b.ssmz=a.ssmz) as count
from shop_tourist_key a WHERE a.ssmz is not null group by a.ssmz LIMIT 0,3;
select a.id,a.ssmz,(select count(ssmz) from shop_tourist_key b where b.ssmz=a.ssmz) as count
from shop_tourist_key a where ISNULL(a.ssmz)=false group by a.ssmz order by count DESC
LIMIT 0,3;
select a.id,a.ssmz,(select count(ssmz) from shop_tourist_key b where b.ssmz=a.ssmz) as count,
count(distinct a.ssmz) from shop_tourist_key a group by a.ssmz LIMIT 0,3 ;