Skip to content

Commit

Permalink
refactor: 优化查询访客地域分布信息接口 SQL
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Dec 22, 2023
1 parent e6c6e1c commit 4df887d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 4df887d

Please sign in to comment.