refactor: 优化查询访客地域分布信息接口 SQL

This commit is contained in:
Charles7c 2023-12-22 21:12:42 +08:00
parent e6c6e1cb0e
commit 4df887d826

View File

@ -38,10 +38,10 @@
<select id="selectListDashboardGeoDistribution" resultType="java.util.Map">
SELECT
`address` AS name,
SUBSTRING_INDEX(`address`, ' ', 1) AS name,
COUNT(DISTINCT `ip`) AS value
FROM `sys_log`
GROUP BY `address`
GROUP BY `name`
ORDER BY COUNT(DISTINCT `ip`) DESC
LIMIT 10
</select>