Metabase Metadata SQL


Metabase is lacking in some of the management information I’d like to see. Hopefully the queries below will help a few others build up a management dashboard too.
In summary:

  1. List of Dashboards
  2. List of Questions
  3. List of Questions in each Dashboard
  4. List of Questions not in any Dashboard
  5. List of Users
  6. LIst of Users who have never logged in
  7. List of Dashboards viewed by each user and count of views
  8. Pretty much anything else you can dream up
/* All dashboards */
SELECT,, rd.description, rd.archived FROM report_dashboard rd;
/* All questions */
select,, q.description, q.archived, q.display, q.query_type
from report_card q;
/* Current dashboards and their questions */
SELECT, as DashboardName, rd.description as DashboardQuestion, as QuestionName, q.description as QuestionDescription, q.display as QuestionDisplay
FROM report_dashboard rd
INNER JOIN report_dashboardcard rdc on = rdc.dashboard_id
INNER JOIN report_card q on = rdc.card_id
where rd.archived = 0 and q.archived = 0;
/* Questions without a dashboard */
select,, q.description, q.display, q.query_type
from report_card q
LEFT OUTER JOIN report_dashboardcard rdc on rdc.card_id =
where q.archived = 0 and rdc.card_id is null;
/* users who have never logged in */
select id, email, first_name, last_name
from core_user
where last_login is null;
/* which dashboards has a user viewed */
select count( as viewCount,, cu.first_name, cu.last_name, as DashboardName, rd.description as DashboardDescription
from core_user cu
INNER JOIN view_log vl on vl.user_id =
INNER JOIN report_dashboard rd on	= vl.model_id
where vl.model='dashboard'
GROUP BY, cu.first_name, cu.last_name,, rd.description

Application and user activities logging
Question last viewed at [SOLVED]
Usage statistics and reports
Analytics of Metabase
Monitorizing users
Refactor Metabase Queries
Check the usage log
User Permissions/Groups Export
Get a list of all fields in all tables from Metabase

In addition:

SELECT * FROM metabase.report_card where dataset_query like '%native%'
gives you all hand written questions in metabase with name and description


How do you get access to the report_dashboardcard table? Is it possible to get the information on how your users are interacting with Metabase?


There’s only information on what they’re viewing, not how they interact.


Do I need to be using an analytics tool in order to create a table to store what people are viewing? Or is there a table in my own database that I can connect to?


It’s not in your application database (metabase doesn’t write back). It’s in Metabase’s own database.


Very helpful.

In addition to this, you can connect Metabase to Metabase’s own database. And then store the query’s by OP as native queries. :slight_smile: This is inception or rather meta-metabase. :slight_smile: