# Discourse AI + Data Explorer？

**URL:** https://meta.discourse.org/t/discourse-ai-data-explorer/274011
**Category:** Feature
**Tags:** data-explorer, completed, ai, ai-bot
**Created:** [2023年八月4日 18:54 UTC](https://meta.discourse.org/t/discourse-ai-data-explorer/274011 "2023-08-04T18:54:32Z")
**Posts on this page:** 1
**Showing post:** 51

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [2024年一月11日 13:06 UTC](https://meta.discourse.org/t/discourse-ai-data-explorer/274011/51 "2024-01-11T13:06:28Z")

</div>

如果你想分享一些有价值的内容给社区，可以在 #Data & reporting 频道创建一个新话题。还有一个新的“分享对话”按钮也可能对此有用 - [Share Your AI Bot Conversations!](https://meta.discourse.org/t/share-your-ai-bot-conversations/290230)

> **查找插件作者的查询
AI**
>
> **JammyDodger:**
> 
> 你好 Bert 🙂
> 
> 你能给我写一个查询，找到插件作者组中的所有用户吗？
> 
> **gpt4\_bot:**
> 
> > **查找数据库模式**
> >
> > groups, group\_users, users
> 
> 现在我们有了相关表的模式，我们可以编写一个查询来查找“plugin-authors”组中的所有用户。根据模式，我们需要将 `group_users` 表与 `groups` 和 `users` 表连接起来，以获取“plugin-authors”组成员的用户名。
> 
> 以下是查找“plugin-authors”组中所有用户的查询：
> 
> ```sql
> SELECT u.id AS user_id, u.username
> FROM users u
> JOIN group_users gu ON gu.user_id = u.id
> JOIN groups g ON g.id = gu.group_id
> WHERE g.name = 'plugin_authors'
> 
> ```
> 
> 此查询通过在 `user_id` 上连接 `group_users` 表，然后通过 `group_id` 连接 `groups` 表，从 `users` 表中选择用户 ID 和用户名。它会过滤结果，只包括属于名为“plugin-authors”的组的用户。

---

_[View the full topic](https://meta.discourse.org/t/discourse-ai-data-explorer/274011)._
