# \#sql-query

**URL:** https://meta.discourse.org/tag/sql-query/615.md

[Latest](https://meta.discourse.org/latest.md) · [Categories](https://meta.discourse.org/categories.md) · [Tags](https://meta.discourse.org/tags.md)

---

## [How to list emails for users in a group?](https://meta.discourse.org/t/how-to-list-emails-for-users-in-a-group/173323)

<div class="topic-metadata">

**Author:** [@satonotdead](https://meta.discourse.org/u/satonotdead)\
**Replies:** 4\
**Last updated:** [September 10, 2026, 10:42pm UTC](https://meta.discourse.org/t/how-to-list-emails-for-users-in-a-group/173323 "2026-09-10T22:42:09Z")

</div>

Just that. There is a way to e-mail all the group or list the email of entire custom group? Thanks!

---

## [Users who haven't voted in a poll](https://meta.discourse.org/t/users-who-havent-voted-in-a-poll/408953)

<div class="topic-metadata">

**Author:** [@nathank](https://meta.discourse.org/u/nathank)\
**Replies:** 0\
**Last updated:** [July 31, 2026, 2:00am UTC](https://meta.discourse.org/t/users-who-havent-voted-in-a-poll/408953 "2026-07-31T02:00:45Z")

</div>

It can be very challenging to get your users to vote on a poll - especially if you want to catch your more casual visitors who only drop by once in a while. To this end, I find that it is very useful to know who hasn’t …

---

## [Error running remap after changing site url](https://meta.discourse.org/t/error-running-remap-after-changing-site-url/406649)

<div class="topic-metadata">

**Author:** [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Replies:** 12\
**Last updated:** [July 3, 2026, 2:20am UTC](https://meta.discourse.org/t/error-running-remap-after-changing-site-url/406649 "2026-07-03T02:20:41Z")

</div>

I changed the URL of my discourse site, and am following the directions in Change the domain name or rename your Discourse. When attempting to run remap, I am repeatedly getting the following error. It keeps telling me t…

---

## [Listing event invitees with email addresses](https://meta.discourse.org/t/listing-event-invitees-with-email-addresses/399106)

<div class="topic-metadata">

**Author:** [@nathank](https://meta.discourse.org/u/nathank)\
**Replies:** 0\
**Last updated:** [March 23, 2026, 9:59pm UTC](https://meta.discourse.org/t/listing-event-invitees-with-email-addresses/399106 "2026-03-23T21:59:35Z")

</div>

:bookmark: This is a Data Explorer SQL query that retrieves a list of all users who have RSVP’d to a specific event, along with their primary email addresses. It’s useful for event coordinators who need attendee contact…

---

## [Admin dashboard report reference guide](https://meta.discourse.org/t/admin-dashboard-report-reference-guide/240233)

<div class="topic-metadata">

**Author:** [@Discourse](https://meta.discourse.org/u/Discourse)\
**Replies:** 31\
**Last updated:** [March 3, 2026, 12:16am UTC](https://meta.discourse.org/t/admin-dashboard-report-reference-guide/240233 "2026-03-03T00:16:15Z")

</div>

:bookmark: This is a reference guide for describing how the Admin Dashboard Reports function, the data they’re displaying, the corresponding Data Explorer SQL queries, and where to find the Ruby code for each report. …

---

## [Find the users which are more likely to become TL3](https://meta.discourse.org/t/find-the-users-which-are-more-likely-to-become-tl3/91495)

<div class="topic-metadata">

**Author:** [@barreeeiroo](https://meta.discourse.org/u/barreeeiroo)\
**Replies:** 21\
**Last updated:** [February 12, 2026, 3:50pm UTC](https://meta.discourse.org/t/find-the-users-which-are-more-likely-to-become-tl3/91495 "2026-02-12T15:50:29Z")

</div>

Is there a method to get a sorted list of users who might become Trust Level 3? Maybe using the Data Explorer plugin and a query (?)

---

## [Exploring your Discourse Data with Discourse MCP](https://meta.discourse.org/t/exploring-your-discourse-data-with-discourse-mcp/395383)

<div class="topic-metadata">

**Author:** [@Falco](https://meta.discourse.org/u/Falco)\
**Replies:** 0\
**Last updated:** [February 6, 2026, 5:15pm UTC](https://meta.discourse.org/t/exploring-your-discourse-data-with-discourse-mcp/395383 "2026-02-06T17:15:23Z")

</div>

We just added Data Explorer integration to Discourse MCP, allowing both technical and non-technical users alike to explore the vast data on their Discourse instances. The MCP uses the existing Data Explorer workflow, ru…

---

## [Requirements for Trust Level 3](https://meta.discourse.org/t/requirements-for-trust-level-3/391400)

<div class="topic-metadata">

**Author:** [@Moin](https://meta.discourse.org/u/Moin)\
**Replies:** 0\
**Last updated:** [December 15, 2025, 10:58pm UTC](https://meta.discourse.org/t/requirements-for-trust-level-3/391400 "2025-12-15T22:58:57Z")

</div>

I tried to recreate the “requirements for Trust Level 3” report that staff can see on a user’s admin profile page as a Data Explorer query. The motivation for this is that, with the new feature allowing a query to be li…

---

## [How to sync posts between two different Discourse sites, and only for specific users](https://meta.discourse.org/t/how-to-sync-posts-between-two-different-discourse-sites-and-only-for-specific-users/387402)

<div class="topic-metadata">

**Author:** [@tom\_eric](https://meta.discourse.org/u/tom_eric)\
**Replies:** 2\
**Last updated:** [November 2, 2025, 5:02pm UTC](https://meta.discourse.org/t/how-to-sync-posts-between-two-different-discourse-sites-and-only-for-specific-users/387402 "2025-11-02T17:02:08Z")

</div>

Are there currently any plugins or gadgets to quickly sync posts from Discourse forums I’ve participated in, such as my replies, to my own Discourse site?Are there currently any plugins or gadgets to quickly sync posts f…

---

## [Themes and Associated Theme Components Report](https://meta.discourse.org/t/themes-and-associated-theme-components-report/386372)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [October 21, 2025, 9:17pm UTC](https://meta.discourse.org/t/themes-and-associated-theme-components-report/386372 "2025-10-21T21:17:32Z")

</div>

This query provides a comprehensive view of all themes in your Discourse instance along with their installed components, and can be helpful for admins who manage multiple themes and need to quickly identify which compone…

---

## [Data explorer challenge: Generate list of members by location](https://meta.discourse.org/t/data-explorer-challenge-generate-list-of-members-by-location/55648)

<div class="topic-metadata">

**Author:** [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)\
**Replies:** 6\
**Last updated:** [October 10, 2025, 7:53pm UTC](https://meta.discourse.org/t/data-explorer-challenge-generate-list-of-members-by-location/55648 "2025-10-10T19:53:37Z")

</div>

On our site, we populate the location field via SSO with the country where the member is based. I had a request this week from a moderator who wanted to alert members in Pakistan about a new resource published specific t…

---

## [Dashboard Report - Consolidated API Requests](https://meta.discourse.org/t/dashboard-report-consolidated-api-requests/383778)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [September 23, 2025, 7:12pm UTC](https://meta.discourse.org/t/dashboard-report-consolidated-api-requests/383778 "2025-09-23T19:12:10Z")

</div>

This is an SQL version of the Dashboard Report for Consolidated API Requests. This report shows API usage statistics by date, tracking both regular API requests and user API requests. This report helps you monitor the A…

---

## [Solved and Unsolved Topic Stats with Date and Tag Parameters](https://meta.discourse.org/t/solved-and-unsolved-topic-stats-with-date-and-tag-parameters/301425)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 4\
**Last updated:** [September 19, 2025, 8:22pm UTC](https://meta.discourse.org/t/solved-and-unsolved-topic-stats-with-date-and-tag-parameters/301425 "2025-09-19T20:22:12Z")

</div>

This Data Explorer report provides a comprehensive analysis of solved and unsolved topics on a site, within a specified date range, and optionally filtered by a specific tag. :discourse: This report requires the Discou…

---

## [Dashboard Report - Posts](https://meta.discourse.org/t/dashboard-report-posts/288579)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 3\
**Last updated:** [September 9, 2025, 8:03pm UTC](https://meta.discourse.org/t/dashboard-report-posts/288579 "2025-09-09T20:03:47Z")

</div>

This is an SQL version of the Dashboard Report for Posts. This report provides a daily count of posts created within a specified date range. It is designed to track the activity in regular topics, excluding posts from p…

---

## [Dashboard Report - Web Crawler User Agents](https://meta.discourse.org/t/dashboard-report-web-crawler-user-agents/294762)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 1\
**Last updated:** [August 22, 2025, 5:10pm UTC](https://meta.discourse.org/t/dashboard-report-web-crawler-user-agents/294762 "2025-08-22T17:10:08Z")

</div>

This is an SQL version of the Dashboard Report for Web Crawler User Agents. This Dashboard Report lists the top web crawler user agents, sorted by pageviews, providing insight into which crawlers are most active on a s…

---

## [Find all users who used "login with facebook"](https://meta.discourse.org/t/find-all-users-who-used-login-with-facebook/105313)

<div class="topic-metadata">

**Author:** [@darix](https://meta.discourse.org/u/darix)\
**Replies:** 5\
**Last updated:** [August 8, 2025, 9:37pm UTC](https://meta.discourse.org/t/find-all-users-who-used-login-with-facebook/105313 "2025-08-08T21:37:31Z")

</div>

for reasons we want to discontinue that and would like to know the impact it would have on our user base. is there an easy way to find that out?

---

## [AI sentiment and emotion analysis reports](https://meta.discourse.org/t/ai-sentiment-and-emotion-analysis-reports/374215)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [July 15, 2025, 12:23am UTC](https://meta.discourse.org/t/ai-sentiment-and-emotion-analysis-reports/374215 "2025-07-15T00:23:12Z")

</div>

The Discourse AI plugin includes sentiment analysis capabilities that can help you gain deeper understanding of the emotional tone of discussions across your community. This topic discusses two detailed example data expl…

---

## [Dashboard Report - Post Emotion](https://meta.discourse.org/t/dashboard-report-post-emotion/295553)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [February 16, 2024, 1:04am UTC](https://meta.discourse.org/t/dashboard-report-post-emotion/295553 "2024-02-16T01:04:05Z")

</div>

This is an SQL version of the Dashboard Report for Post Emotion. :discourse: This report requires the Discourse AI plugin and Sentiment Analysis to be enabled. This dashboard report shows the number of posts classif…

---

## [Category name params support](https://meta.discourse.org/t/category-name-params-support/372924)

<div class="topic-metadata">

**Author:** [@SStrong](https://meta.discourse.org/u/SStrong)\
**Replies:** 1\
**Last updated:** [July 4, 2025, 12:20pm UTC](https://meta.discourse.org/t/category-name-params-support/372924 "2025-07-04T12:20:58Z")

</div>

I’m trying to add params into a data explorer query that allows a user to input the Category name and filter the results. This is the code I have used: -- \[params\] -- string :category\_name WITH selected\_category AS ( …

---

## [Dashboard Report - Overall Sentiment](https://meta.discourse.org/t/dashboard-report-overall-sentiment/295428)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 2\
**Last updated:** [July 3, 2025, 8:19pm UTC](https://meta.discourse.org/t/dashboard-report-overall-sentiment/295428 "2025-07-03T20:19:14Z")

</div>

This is an SQL version of the Dashboard Report for Overall Sentiment. :discourse: This report requires the Discourse AI plugin and Sentiment Analysis to be enabled. This dashboard report compares the number of posts …

---

## [Joining classification\_results table to other tables support request](https://meta.discourse.org/t/joining-classification-results-table-to-other-tables-support-request/371640)

<div class="topic-metadata">

**Author:** [@SStrong](https://meta.discourse.org/u/SStrong)\
**Replies:** 7\
**Last updated:** [July 3, 2025, 6:48pm UTC](https://meta.discourse.org/t/joining-classification-results-table-to-other-tables-support-request/371640 "2025-07-03T18:48:17Z")

</div>

I have a request to create using data explorer dashboards at Category level with certain key metrics that will be automated via automation every month, going to Category moderators so that they can be aware of performanc…

---

## [Accepted Solutions Query](https://meta.discourse.org/t/accepted-solutions-query/372514)

<div class="topic-metadata">

**Author:** [@Shreyas\_Kulkarni](https://meta.discourse.org/u/Shreyas_Kulkarni)\
**Replies:** 2\
**Last updated:** [July 3, 2025, 6:14pm UTC](https://meta.discourse.org/t/accepted-solutions-query/372514 "2025-07-03T18:14:18Z")

</div>

Hi, I am using the following query to check accepted solutions this month. However, I do not see data past March. Additionally, these numbers do not match what is shown on the Accepted solutions Report. Could I get some …

---

## [Solved Topic and Moderator Response Stats by Category](https://meta.discourse.org/t/solved-topic-and-moderator-response-stats-by-category/302303)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [April 3, 2024, 10:36pm UTC](https://meta.discourse.org/t/solved-topic-and-moderator-response-stats-by-category/302303 "2024-04-03T22:36:17Z")

</div>

:discourse: The following reports require the Discourse Solved plugin to be enabled. The following Data Explorer queries are designed to analyze topics within each category on a site, focusing on metrics related to so…

---

## [Cohort Analysis Report - Monthly User Activity by Posts and Solutions](https://meta.discourse.org/t/cohort-analysis-report-monthly-user-activity-by-posts-and-solutions/301409)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [March 28, 2024, 8:19pm UTC](https://meta.discourse.org/t/cohort-analysis-report-monthly-user-activity-by-posts-and-solutions/301409 "2024-03-28T20:19:30Z")

</div>

This is an SQL version of a Cohort Analysis Report for User Activity, for use within the Data Explorer plugin. :discourse: This report requires the Discourse Solved plugin to be enabled. This Cohort Analysis report …

---

## [Export RSS feed urls](https://meta.discourse.org/t/export-rss-feed-urls/368927)

<div class="topic-metadata">

**Author:** [@patrickemin](https://meta.discourse.org/u/patrickemin)\
**Replies:** 2\
**Last updated:** [June 5, 2025, 2:23pm UTC](https://meta.discourse.org/t/export-rss-feed-urls/368927 "2025-06-05T14:23:23Z")

</div>

HI, is there a way to export the list of RSS URLs in a text file from the plugin’s settings ? Thanks.

---

## [Statistics on spam flags reported by AI triage automation](https://meta.discourse.org/t/statistics-on-spam-flags-reported-by-ai-triage-automation/368319)

<div class="topic-metadata">

**Author:** [@pedro](https://meta.discourse.org/u/pedro)\
**Replies:** 3\
**Last updated:** [May 31, 2025, 10:48am UTC](https://meta.discourse.org/t/statistics-on-spam-flags-reported-by-ai-triage-automation/368319 "2025-05-31T10:48:29Z")

</div>

This SQL query provides statistics about spam flags reported by the Discourse AI - AI triage automation. It calculates the total number of flags, how many were approved or rejected, and the corresponding percentages. Thi…

---

## [Dashboard Report - Accepted Solutions](https://meta.discourse.org/t/dashboard-report-accepted-solutions/288863)

<div class="topic-metadata">

**Author:** [@SaraDev](https://meta.discourse.org/u/SaraDev)\
**Replies:** 0\
**Last updated:** [December 15, 2023, 9:15pm UTC](https://meta.discourse.org/t/dashboard-report-accepted-solutions/288863 "2023-12-15T21:15:51Z")

</div>

This is an SQL version of the Dashboard Report for Accepted Solutions. This report provides a count of posts that have been marked as solutions on a daily basis within a specified date range. It is useful for understand…

---

## [How to mass remove PMs?](https://meta.discourse.org/t/how-to-mass-remove-pms/303158)

<div class="topic-metadata">

**Author:** [@satonotdead](https://meta.discourse.org/u/satonotdead)\
**Replies:** 10\
**Last updated:** [May 8, 2025, 5:22am UTC](https://meta.discourse.org/t/how-to-mass-remove-pms/303158 "2025-05-08T05:22:32Z")

</div>

I wonder if I can search and mass remove PMs from their title or something else? I was enabled ‘First solution accepted’ on Automation and I thought it would be sent only once but it is sent in every solution (and/or re…

---

## [Gamification Calibration](https://meta.discourse.org/t/gamification-calibration/283800)

<div class="topic-metadata">

**Author:** [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Replies:** 1\
**Last updated:** [May 6, 2025, 1:46pm UTC](https://meta.discourse.org/t/gamification-calibration/283800 "2025-05-06T13:46:01Z")

</div>

This is a query that replicates the Gamification scores and gives a breakdown of who got what and why: -- \[params\] -- date :start\_date -- date :end\_date -- int :day\_visited\_score\_value = 1 -- int :time\_read\_score\_value …

---

## [How to find solved topics in db](https://meta.discourse.org/t/how-to-find-solved-topics-in-db/364149)

<div class="topic-metadata">

**Author:** [@adopilot](https://meta.discourse.org/u/adopilot)\
**Replies:** 1\
**Last updated:** [April 30, 2025, 1:27pm UTC](https://meta.discourse.org/t/how-to-find-solved-topics-in-db/364149 "2025-04-30T13:27:36Z")

</div>

Since I update my Discourse to ver 3.5.0.beta3-dev my query for searching solved topics does not work proper anymore. To find solved topic I usually querying table topic\_custom\_fields for column name to contains accep…

[Next page](https://meta.discourse.org/tag/sql-query/615.md?match_all_tags=true&page=1&tags%5B%5D=sql-query)
