# Data & reporting

**URL:** https://meta.discourse.org/c/community-building/data-reporting/148.md?page=21

[最新版本](https://meta.discourse.org/latest.md) · [分類](https://meta.discourse.org/categories.md) · [標簽](https://meta.discourse.org/tags.md)

**Page:** 22

---

## [响应时间](https://meta.discourse.org/t/time-to-response/120808)

<div class="topic-metadata">

**Author:** [@Jeanne\_Bertrand](https://meta.discourse.org/u/Jeanne_Bertrand)\
**回覆:** 3\
**Last updated:** [2019年六月20日 17:29 UTC](https://meta.discourse.org/t/time-to-response/120808 "2019-06-20T17:29:08Z")

</div>

你好，Discourse！ 我想知道你们在报告中是如何计算首次响应时间的。 这是基于你们数据库中的哪些数据集合？ 感谢你们的时间：slight\_smile Jeanne

---

## [查询 user\_custom\_fields](https://meta.discourse.org/t/querying-user-custom-fields/120418)

<div class="topic-metadata">

**Author:** [@slackmoehrle](https://meta.discourse.org/u/slackmoehrle)\
**回覆:** 2\
**Last updated:** [2019年六月15日 17:30 UTC](https://meta.discourse.org/t/querying-user-custom-fields/120418 "2019-06-15T17:30:06Z")

</div>

我们的市场部需要一些数据。我可以查询 Discourse 来获取。不过，我在 user\_custom\_fields 方面遇到了一些问题：我们有多个自定义字段，每个字段在表中似乎都对应每个用户的一行。所以……

---

## [Discourse中的页面浏览量是如何计算的？](https://meta.discourse.org/t/how-are-pageviews-calculated-in-discourse/61352)

<div class="topic-metadata">

**Author:** [@Sinonia](https://meta.discourse.org/u/Sinonia)\
**回覆:** 4\
**Last updated:** [2019年五月28日 00:29 UTC](https://meta.discourse.org/t/how-are-pageviews-calculated-in-discourse/61352 "2019-05-28T00:29:00Z")

</div>

页面浏览量是如何确定的？我问这个是因为我在想是否有人可能会通过机器人增加页面浏览量。

---

## [在数据资源管理器中测试徽章查询时遇到问题](https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568)

<div class="topic-metadata">

**Author:** [@Mark\_Schmucker](https://meta.discourse.org/u/Mark_Schmucker)\
**回覆:** 3\
**Last updated:** [2019年五月24日 00:46 UTC](https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568 "2019-05-24T00:46:42Z")

</div>

我是否可以在数据探索器中运行任何徽章查询？ 我想以“感谢”为起点创建一个自定义徽章查询。我在数据探索器中输入“感谢”查询： SELECT p.user\_id, current\_timestam…

---

## [SQL：每个用户最常用的N个词（用他们的语言交流！）](https://meta.discourse.org/t/sql-the-most-n-used-words-per-user-speak-their-language/38556)

<div class="topic-metadata">

**Author:** [@meglio](https://meta.discourse.org/u/meglio)\
**回覆:** 20\
**Last updated:** [2019年五月17日 21:47 UTC](https://meta.discourse.org/t/sql-the-most-n-used-words-per-user-speak-their-language/38556 "2019-05-17T21:47:32Z")

</div>

通过观察用户使用的前20…50个词，我希望能识别出谁最关心什么，然后利用这些信息在正确的话题上与他们互动，问他们正确的问题，以获得更好的动力。

---

## [特定组中的用户但不包含在其他组中](https://meta.discourse.org/t/users-in-specific-group-s-but-not-in-other-group-s/275159)

<div class="topic-metadata">

**Author:** [@SvenC56](https://meta.discourse.org/u/SvenC56)\
**回覆:** 0\
**Last updated:** [2019年五月14日 14:50 UTC](https://meta.discourse.org/t/users-in-specific-group-s-but-not-in-other-group-s/275159 "2019-05-14T14:50:11Z")

</div>

特定组中的用户但不在其他组中 信息：参数必须写成数组格式。例如：{1,2,3} -- \[params\] -- string :opt\_in\_groups -- string :opt\_out\_groups SELECT u.id AS user\_id, …

---

## [特定组用户最近 N 天前最后活跃时间](https://meta.discourse.org/t/users-in-specific-group-last-seen-since-n-days-ago/275158)

<div class="topic-metadata">

**Author:** [@SvenC56](https://meta.discourse.org/u/SvenC56)\
**回覆:** 0\
**Last updated:** [2019年五月14日 14:50 UTC](https://meta.discourse.org/t/users-in-specific-group-last-seen-since-n-days-ago/275158 "2019-05-14T14:50:00Z")

</div>

用户（在特定组中）上次活跃距今 N 天 -- \[参数\] -- int :member\_group -- int :days\_since\_last\_activity SELECT u.id AS user\_id, Age(u.last\_seen\_at) AS last\_seen, g.id …

---

## [在投票中选择特定答案的徽章？](https://meta.discourse.org/t/badge-for-choosing-a-specific-answer-in-a-poll/281539)

<div class="topic-metadata">

**Author:** [@Jeff\_Vienneau](https://meta.discourse.org/u/Jeff_Vienneau)\
**回覆:** 0\
**Last updated:** [2019年五月1日 17:47 UTC](https://meta.discourse.org/t/badge-for-choosing-a-specific-answer-in-a-poll/281539 "2019-05-01T17:47:20Z")

</div>

是否可以为在投票中选择特定答案的用户制作徽章？

---

## [寻找一些与投票相关的好徽章](https://meta.discourse.org/t/looking-for-some-good-badges-related-to-voting/116086)

<div class="topic-metadata">

**Author:** [@Marc\_Montecalvo](https://meta.discourse.org/u/Marc_Montecalvo)\
**回覆:** 6\
**Last updated:** [2019年四月29日 14:06 UTC](https://meta.discourse.org/t/looking-for-some-good-badges-related-to-voting/116086 "2019-04-29T14:06:37Z")

</div>

我有几个关于徽章的想法，但我不确定如何编写查询（我对表结构还不够熟悉）。这些数字仅作为基础使用。我将扩展它们以创建更多徽章。 有人获得了1…

---

## [应该享受圣诞节！徽章](https://meta.discourse.org/t/should-be-enjoying-christmas-badge/281536)

<div class="topic-metadata">

**Author:** [@Alexander\_Wright](https://meta.discourse.org/u/Alexander_Wright)\
**回覆:** 2\
**Last updated:** [2019年四月20日 20:53 UTC](https://meta.discourse.org/t/should-be-enjoying-christmas-badge/281536 "2019-04-20T20:53:45Z")

</div>

应该享受圣诞节！ 此代码将为在“一年中的第358天”至新年后第2天之间登录的每位用户授予一个徽章。请根据您的需求进行表述！ SQL： SELECT distinct(user\_id), CURRENT\_DATE as granted\_at FROM…

---

## [特定用户组的用户统计](https://meta.discourse.org/t/user-statistics-for-a-particular-group/275174)

<div class="topic-metadata">

**Author:** [@DNSTARS](https://meta.discourse.org/u/DNSTARS)\
**回覆:** 0\
**Last updated:** [2019年四月18日 11:33 UTC](https://meta.discourse.org/t/user-statistics-for-a-particular-group/275174 "2019-04-18T11:33:44Z")

</div>

已借助 @pfaffman 的专业能力迅速解决了这个问题，在此向他致谢。我将把脚本交给社区。我们将使用它的方式是允许约 100 名注册者加入，然后锁定公共访问…

---

## [支持小组的首次响应时间](https://meta.discourse.org/t/time-to-first-response-for-a-support-group/275154)

<div class="topic-metadata">

**Author:** [@angus](https://meta.discourse.org/u/angus)\
**回覆:** 0\
**Last updated:** [2019年四月12日 08:32 UTC](https://meta.discourse.org/t/time-to-first-response-for-a-support-group/275154 "2019-04-12T08:32:25Z")

</div>

在为 @icaria36 改进其使用 Discourse 群组作为支持系统的过程中，我们开发了一些查询（后续还将有更多）。如果您能发现任何问题或改进之处，请告诉我们：slight\_smile: T…

---

## [帮助创建查询以复制 TL3 进度](https://meta.discourse.org/t/help-with-creating-a-query-to-replicate-tl3-progress/275153)

<div class="topic-metadata">

**Author:** [@Kyle\_Risi](https://meta.discourse.org/u/Kyle_Risi)\
**回覆:** 0\
**Last updated:** [2019年四月4日 14:37 UTC](https://meta.discourse.org/t/help-with-creating-a-query-to-replicate-tl3-progress/275153 "2019-04-04T14:37:52Z")

</div>

大家好， 在我们社区中，我们有一套机制，将某些活跃用户晋升为“PosBuddy”（积极伙伴）身份。这些用户不仅认同我们品牌的语调风格，还展现出解答问题、推动社区互动的能力……

---

## [查找特定月份内标记为“已解决”的帖子](https://meta.discourse.org/t/find-posts-solved-in-specific-month/112674)

<div class="topic-metadata">

**Author:** [@user2](https://meta.discourse.org/u/user2)\
**回覆:** 4\
**Last updated:** [2019年三月29日 22:06 UTC](https://meta.discourse.org/t/find-posts-solved-in-specific-month/112674 "2019-03-29T22:06:38Z")

</div>

我在企业环境中运行 Discourse，将其用作订单和文档系统。我使用标签来选择订单（主题）是进行中还是已完成。但我需要一种方法来识别在 Mars 中已完成的订单……

---

## [使用 Data-Explorer 插件按主题统计页面浏览量](https://meta.discourse.org/t/counting-pageviews-per-topic-using-the-data-explorer-plugin/112417)

<div class="topic-metadata">

**Author:** [@Alexandra\_Diehl](https://meta.discourse.org/u/Alexandra_Diehl)\
**回覆:** 5\
**Last updated:** [2019年三月27日 00:25 UTC](https://meta.discourse.org/t/counting-pageviews-per-topic-using-the-data-explorer-plugin/112417 "2019-03-27T00:25:05Z")

</div>

大家好， 请问如何访问按主题划分的页面浏览量历史/时间序列数据？ 我尝试使用表 top\_topics 和 topic\_views，但它们都没有包含完整的结果…

---

## [用户被提及但未回应的主题](https://meta.discourse.org/t/topics-where-user-mentioned-and-hasn-t-responded-after-being-mentioned/275152)

<div class="topic-metadata">

**Author:** [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**回覆:** 1\
**Last updated:** [2019年三月18日 11:49 UTC](https://meta.discourse.org/t/topics-where-user-mentioned-and-hasn-t-responded-after-being-mentioned/275152 "2019-03-18T11:49:14Z")

</div>

我连一点SQL都不懂……但有没有可能写一个查询，显示我被提及但尚未回复的话题……（我想这部分可能很棘手，甚至可能无法实现）……

---

## [特定标签的查看次数](https://meta.discourse.org/t/view-count-of-a-specific-tag/275150)

<div class="topic-metadata">

**Author:** [@Viki](https://meta.discourse.org/u/Viki)\
**回覆:** 1\
**Last updated:** [2019年三月16日 23:41 UTC](https://meta.discourse.org/t/view-count-of-a-specific-tag/275150 "2019-03-16T23:41:17Z")

</div>

如何查询带有特定标签的所有主题的浏览量？

---

## [数据探索器类别权限](https://meta.discourse.org/t/data-explorer-categories-permissions/111682)

<div class="topic-metadata">

**Author:** [@csmu](https://meta.discourse.org/u/csmu)\
**回覆:** 1\
**Last updated:** [2019年三月16日 20:09 UTC](https://meta.discourse.org/t/data-explorer-categories-permissions/111682 "2019-03-16T20:09:23Z")

</div>

是否有现有的 SQL 语句，使用 Data Explorer 插件，提取所有子类别的独立权限，并将其与父类别的权限进行对比？

---

## [访问受保护分类中主题的用户](https://meta.discourse.org/t/users-who-have-accessed-a-topic-in-a-protected-category/275149)

<div class="topic-metadata">

**Author:** [@Cozdabuch](https://meta.discourse.org/u/Cozdabuch)\
**回覆:** 3\
**Last updated:** [2019年三月15日 17:15 UTC](https://meta.discourse.org/t/users-who-have-accessed-a-topic-in-a-protected-category/275149 "2019-03-15T17:15:37Z")

</div>

我需要一些帮助。我对 SQL 一窍不通。 我正在为我的工会管理一个论坛。我是一名民选代表，但并不在领导层。我之所以负责管理，是因为我有……

---

## [列出所有未处理的 PM](https://meta.discourse.org/t/list-all-open-pms/275045)

<div class="topic-metadata">

**Author:** [@rishabh](https://meta.discourse.org/u/rishabh)\
**回覆:** 0\
**Last updated:** [2019年三月15日 12:57 UTC](https://meta.discourse.org/t/list-all-open-pms/275045 "2019-03-15T12:57:56Z")

</div>

列出所有未解决的私信 按最近活动排序 SELECT t.id AS topic\_id, t.user\_id FROM topics t JOIN posts p ON t.id = p.topic\_id WHERE t.archetype = 'private\_message' AND t.user\_id \> 0 AND t.reply\_coun…

---

## [有多少成员打开了欢迎私信？](https://meta.discourse.org/t/how-many-members-open-the-welcome-pm/275043)

<div class="topic-metadata">

**Author:** [@Jumanji](https://meta.discourse.org/u/Jumanji)\
**回覆:** 4\
**Last updated:** [2019年三月11日 00:25 UTC](https://meta.discourse.org/t/how-many-members-open-the-welcome-pm/275043 "2019-03-11T00:25:07Z")

</div>

有人能帮忙写一个查询，显示有多少成员打开了欢迎私信吗？ 谢谢！

---

## [帮助我理解匿名用户统计信息](https://meta.discourse.org/t/help-me-understand-the-anonymous-users-statistics/110772)

<div class="topic-metadata">

**Author:** [@DigitalStartup](https://meta.discourse.org/u/DigitalStartup)\
**回覆:** 8\
**Last updated:** [2019年三月6日 19:55 UTC](https://meta.discourse.org/t/help-me-understand-the-anonymous-users-statistics/110772 "2019-03-06T19:55:08Z")

</div>

不知何故，过去一周我的匿名用户统计数据激增。根据 Google Analytics 的数据，在此期间我仅有约 200 次会话。 不知道是否与爬虫有关……

---

## [使用 CASE 表达式对结果进行排序](https://meta.discourse.org/t/using-a-case-expression-to-order-results/275148)

<div class="topic-metadata">

**Author:** [@simon](https://meta.discourse.org/u/simon)\
**回覆:** 0\
**Last updated:** [2019年三月1日 20:39 UTC](https://meta.discourse.org/t/using-a-case-expression-to-order-results/275148 "2019-03-01T20:39:18Z")

</div>

使用 CASE 表达式对结果进行排序 我认为无法将关键字作为参数传递，但可以在 CASE 表达式中使用布尔型 \`:desc\` 参数。 --\[params\] -- boolean :desc = false SELECT \* FROM…

---

## [Top quality users in last six months](https://meta.discourse.org/t/top-quality-users-in-last-six-months/275006)

<div class="topic-metadata">

**Author:** [@ChrisBeach](https://meta.discourse.org/u/ChrisBeach)\
**回覆:** 3\
**Last updated:** [2019年一月30日 13:43 UTC](https://meta.discourse.org/t/top-quality-users-in-last-six-months/275006 "2019-01-30T13:43:02Z")

</div>

Top quality users in last six months Top 20 users by average post score. Post scores are calculated based on reply count, likes, incoming links, bookmarks, average time (reading?) and read count. SELECT sum(p.scor…

---

## [数据探索器 - 查询以确定用户主题偏好](https://meta.discourse.org/t/data-explorer-query-to-determine-user-theme-preferences/106718)

<div class="topic-metadata">

**Author:** [@RobMeade](https://meta.discourse.org/u/RobMeade)\
**回覆:** 4\
**Last updated:** [2019年一月16日 18:27 UTC](https://meta.discourse.org/t/data-explorer-query-to-determine-user-theme-preferences/106718 "2019-01-16T18:27:21Z")

</div>

大家好， 想知道是否有人能帮我解决这个问题。 我正在尝试确定使用深色或浅色主题的用户数量，我为数据探索器拼凑了以下内容； /\* 浅色主题 \*/ SELECT COUNT(\*) …

---

## [有用的指标/统计](https://meta.discourse.org/t/useful-metric-statics/106350)

<div class="topic-metadata">

**Author:** [@hhlp](https://meta.discourse.org/u/hhlp)\
**回覆:** 2\
**Last updated:** [2019年一月12日 22:32 UTC](https://meta.discourse.org/t/useful-metric-statics/106350 "2019-01-12T22:32:36Z")

</div>

我曾在 Discourse 的某个地方读到过一篇帖子，但现在已经找不到了。那篇帖子中有人用 SQL 查询编写了一些有用的指标/统计信息……其中有一些是我想要使用的。 您能帮我指出来吗？ 此致，

---

## [查找拥有最多徽章的“前 X"用户](https://meta.discourse.org/t/finding-top-x-users-with-the-most-badges/275042)

<div class="topic-metadata">

**Author:** [@Richie](https://meta.discourse.org/u/Richie)\
**回覆:** 5\
**Last updated:** [2018年十二月23日 18:06 UTC](https://meta.discourse.org/t/finding-top-x-users-with-the-most-badges/275042 "2018-12-23T18:06:46Z")

</div>

是否有人编写过 SQL 来显示用户列表（例如前 10 名），并按其拥有的徽章总数排序？ 我已在数据浏览器中查看过，并检查了“user\_badges”表，可以看到 …

---

## [投票结果](https://meta.discourse.org/t/poll-results/275147)

<div class="topic-metadata">

**Author:** [@JanJoost](https://meta.discourse.org/u/JanJoost)\
**回覆:** 0\
**Last updated:** [2018年十二月19日 10:56 UTC](https://meta.discourse.org/t/poll-results/275147 "2018-12-19T10:56:49Z")

</div>

大家好， 我刚刚在这里发了一篇帖子，内容是关于我们的用户如何误用（或滥用？）投票功能来创建自己的公共问答竞赛。 我编写了一个小型查询，用于获取包含 N 个投票的帖子的结果，包括哪些用户投了票……

---

## [非作者发布的主题帖子数量？](https://meta.discourse.org/t/number-of-posts-on-topics-where-poster-is-not-the-author/104472)

<div class="topic-metadata">

**Author:** [@SidV](https://meta.discourse.org/u/SidV)\
**回覆:** 2\
**Last updated:** [2018年十二月17日 17:32 UTC](https://meta.discourse.org/t/number-of-posts-on-topics-where-poster-is-not-the-author/104472 "2018-12-17T17:32:31Z")

</div>

让我们假设以下情况： 一名用户创建了一个新讨论，并在其主题下回复了 2 次。同时，该用户在其他用户发布的主题中，回复了 5 条消息。 该用户的……

---

## [已为话题添加标签的用户](https://meta.discourse.org/t/users-who-have-added-tags-to-topics/275040)

<div class="topic-metadata">

**Author:** [@southpaw](https://meta.discourse.org/u/southpaw)\
**回覆:** 2\
**Last updated:** [2018年十一月19日 04:36 UTC](https://meta.discourse.org/t/users-who-have-added-tags-to-topics/275040 "2018-11-19T04:36:26Z")

</div>

有人能帮我写一个查询吗？该查询需要返回在给定日期范围内将特定标签添加到主题的用户，以及他们执行此操作的次数。@nixie 您是否已经能够编写 t…

[上一頁](https://meta.discourse.org/c/community-building/data-reporting/148.md?page=20)

[下一頁](https://meta.discourse.org/c/community-building/data-reporting/148.md?page=22)
