查询结果中出现行号(适用于按名次排序)
SELECT @rowno:=@rowno + 1 AS rowno,COUNT(id),phone FROM tbl_hh,(SELECT @rowno:=0) b GROUP BY phone ORDER BY COUNT(id) DESC
SELECT @rowno:=@rowno + 1 AS rowno,COUNT(id),phone FROM tbl_hh,(SELECT @rowno:=0) b GROUP BY phone ORDER BY COUNT(id) DESC