# 🔔 公告：每月创建的话题数量统计

**URL:** <https://www.xuxiaowei.com.cn/t/topic/1163>\
**Category:** Announcements 公告\
**Tags:** xychart-beta, announcements, mermaid, portfolio\
**Created:** [2026 年8 月 25 日 13:39 UTC](https://www.xuxiaowei.com.cn/t/topic/1163 "2026-08-25T13:39:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

作者： ![xuxiaowei](https://www.xuxiaowei.com.cn/user_avatar/www.xuxiaowei.com.cn/xuxiaowei/32/3034_2.png) [@xuxiaowei](https://www.xuxiaowei.com.cn/u/xuxiaowei)\
发布日期： [2026 年8 月 25 日 13:39 UTC](https://www.xuxiaowei.com.cn/t/topic/1163/1 "2026-08-25T13:39:19Z")

</div>

## 2025年～2026年 新增话题累计总和

```mermaid
---
config:
  xyChart:
      width: 1000
      height: 500
  themeVariables:
    xyChart:
      plotColorPalette: "#34C759"
---
xychart-beta
    title "2025年～2026年 新增话题累计总和"
    x-axis ["2025-12", "2026-01", "2026-02", "2026-03", "2026-04", "2026-05", "2026-06", "2026-07", "2026-08", "2026-09", "2026-10", "2026-11"]
    y-axis "统计月份" 0 --> 1200
    line [14, 422, 454, 503, 551, 655, 786, 897, 1080, 1185, 1247, 1251]

```

## 2025年～2026年 各月新增话题数量

```mermaid
---
config:
  xyChart:
      width: 1000
      height: 500
  themeVariables:
    xyChart:
      plotColorPalette: "#34C759"
---
xychart-beta
    title "2025年～2026年 各月新增话题数量"
    x-axis ["2025-12", "2026-01", "2026-02", "2026-03", "2026-04", "2026-05", "2026-06", "2026-07", "2026-08", "2026-09", "2026-10", "2026-11"]
    y-axis "统计月份" 0 --> 500
    line [14, 408, 32, 49, 48, 104, 131, 111, 183, 105, 62, 4]

```

## 更新频率

> 每月上旬更新

> 如果没有及时更新，请留言提醒

## 数据渲染方式与格式

- markdown mermaid xychart-beta
- height：`500`
- width：`(`x-axis` length + 1) * 100`
- y-axis：`CEILING(`line` + 1, 100)`

## 统计方式

> 根据下列统计方式可知，如果历史话题被删除、隐藏，将会影响历史月份统计结果

```auto
WITH allowed_categories AS (SELECT id
                            FROM categories
                            WHERE read_restricted = false /*阅读限制*/
                            UNION
                            select category_groups.category_id
                            from groups
                                     left join category_groups on groups.id = category_groups.group_id
                            where name = 'trust_level_0' /*登录用户最低等级*/),
     monthly_stats AS (SELECT TO_CHAR(DATE_TRUNC('month', t.created_at), 'YYYY-MM') AS 统计月份,
                              COUNT(1) AS 月新增数量
                       FROM topics t
                                INNER JOIN allowed_categories ac ON t.category_id = ac.id
                       WHERE t.deleted_at IS NULL
                       GROUP BY 统计月份)
SELECT 统计月份,
       月新增数量,
       SUM(月新增数量) OVER (ORDER BY 统计月份) AS 累计总数
FROM monthly_stats
ORDER BY 统计月份

```

## 查询数据快速处理

- [IDEA 查询数据后，复制出 Markdown mermaid xychart-beta 所需数据](https://www.xuxiaowei.com.cn/t/idea-markdown-mermaid-xychart-beta/1165)

---

<div class="post-metadata">

作者： ![xuxiaowei](https://www.xuxiaowei.com.cn/user_avatar/www.xuxiaowei.com.cn/xuxiaowei/32/3034_2.png) [@xuxiaowei](https://www.xuxiaowei.com.cn/u/xuxiaowei)\
发布日期： [2026 年9 月 30 日 16:19 UTC](https://www.xuxiaowei.com.cn/t/topic/1163/2 "2026-09-30T16:19:31Z")

</div>

数据已经更新至 2026-10-01

---

<div class="post-metadata">

作者： ![xuxiaowei](https://www.xuxiaowei.com.cn/user_avatar/www.xuxiaowei.com.cn/xuxiaowei/32/3034_2.png) [@xuxiaowei](https://www.xuxiaowei.com.cn/u/xuxiaowei)\
发布日期： [2026 年11 月 2 日 09:28 UTC](https://www.xuxiaowei.com.cn/t/topic/1163/3 "2026-11-02T09:28:24Z")

</div>

数据已经更新至 2026-11-02
