mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 20:57:14 +08:00
refactor: 优化查询访客地域分布信息接口 SQL
This commit is contained in:
@@ -38,10 +38,10 @@
|
|||||||
|
|
||||||
<select id="selectListDashboardGeoDistribution" resultType="java.util.Map">
|
<select id="selectListDashboardGeoDistribution" resultType="java.util.Map">
|
||||||
SELECT
|
SELECT
|
||||||
`address` AS name,
|
SUBSTRING_INDEX(`address`, ' ', 1) AS name,
|
||||||
COUNT(DISTINCT `ip`) AS value
|
COUNT(DISTINCT `ip`) AS value
|
||||||
FROM `sys_log`
|
FROM `sys_log`
|
||||||
GROUP BY `address`
|
GROUP BY `name`
|
||||||
ORDER BY COUNT(DISTINCT `ip`) DESC
|
ORDER BY COUNT(DISTINCT `ip`) DESC
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
</select>
|
</select>
|
||||||
|
Reference in New Issue
Block a user