sql:SELECT ip,COUNT(ip) as num_ip from monitor_healing_servicelog group by ip ORDER BY num_ip desc limit 10; 尝试的官方文档的写法,统计出 ip 重复出现的 top10,所有的结果都是 1 data1 = models.ServiceLog.objects.annotate(num_ip=Count("ip")).order_by("-num_ip") ---- 输出 data1[0].num_ip 的结果为 1