# Data explorer queries similar to dashboard stats

**URL:** https://meta.discourse.org/t/data-explorer-queries-similar-to-dashboard-stats/226973
**Category:** Data & reporting
**Tags:** sql-query, dashboard-reports
**Created:** [May 13, 2022, 6:52pm UTC](https://meta.discourse.org/t/data-explorer-queries-similar-to-dashboard-stats/226973 "2022-05-13T18:52:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![camilaoliveira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilaoliveira/32/256630_2.png) [@camilaoliveira](https://meta.discourse.org/u/camilaoliveira)
#### Post date: [May 13, 2022, 6:52pm UTC](https://meta.discourse.org/t/data-explorer-queries-similar-to-dashboard-stats/226973/1 "2022-05-13T18:52:11Z")

</div>

I’d like to know if there’re queries that someone in the community have created that brings similar data as the admin dashboard stats bring.  
I wish to share some statistic to category moderators using [data explorer](https://meta.discourse.org/t/32566?silent=true) feature, as such Likes, Bookmarks, Pageviews, Active users, **filtered by category**.  
Some of these are found in the admin dashboard, but I’m interested in the query so I can share it using [Data Explorer](https://meta.discourse.org/t/32566?silent=true).  
I’ve searched here on Meta and in [this page](https://github.com/SidVal/discourse-data-explorer/blob/queries/querys.md) from @SidV , but I didn’t find anything close to what I mentioned.

---

<div class="post-metadata">

### Author: ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)
#### Post date: [May 13, 2022, 7:35pm UTC](https://meta.discourse.org/t/data-explorer-queries-similar-to-dashboard-stats/226973/2 "2022-05-13T19:35:04Z")

</div>

Did you check [(Superseded) What cool data explorer queries have you come up with?](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516)

The queries you see in the dashboard are here [discourse/app/models/concerns/reports at 1472e47aae5bfdfb6fd9abfe89beb186c751f514 · discourse/discourse · GitHub](https://github.com/discourse/discourse/tree/1472e47aae5bfdfb6fd9abfe89beb186c751f514/app/models/concerns/reports) but you’d need to dig a bit in the ruby code to extract the SQL query.

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [May 14, 2022, 12:10am UTC](https://meta.discourse.org/t/data-explorer-queries-similar-to-dashboard-stats/226973/3 "2022-05-14T00:10:25Z")

</div>

I’m keen to have the dashboard filterable by group and category. By extracting those queries we can get at least part way there, eh?

It would be great to have each of those queries included in the default queries with [Data Explorer](https://meta.discourse.org/t/32566?silent=true).

---

<div class="post-metadata">

### Author: ![camilaoliveira](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilaoliveira/32/256630_2.png) [@camilaoliveira](https://meta.discourse.org/u/camilaoliveira)
#### Post date: [May 16, 2022, 8:28pm UTC](https://meta.discourse.org/t/data-explorer-queries-similar-to-dashboard-stats/226973/4 "2022-05-16T20:28:44Z")

</div>

Thank you, @cocococosti ! I’ve checked [What cool data explorer queries have you come up with?](https://meta.discourse.org/t/what-cool-data-explorer-queries-have-you-come-up-with/43516) before and didn’t find. But now I’ll try your other suggestion and dig the code. When I managed to do it, I’ll try to update this topic with the queries.
