Data explorer Queries similar to dashboard stats

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 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.
I’ve searched here on Meta and in this page from @SidV , but I didn’t find anything close to what I mentioned.

Did you check What cool data explorer queries have you come up with?

The queries you see in the dashboard are here discourse/app/models/concerns/reports at 1472e47aae5bfdfb6fd9abfe89beb186c751f514 · discourse/discourse · GitHub but you’d need to dig a bit in the ruby code to extract the SQL query.

1 Like

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.


Thank you, @cocococosti ! I’ve checked What cool data explorer queries have you come up with? 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.