Run SQL in the Query Builder

The Query Builder lets you browse the tables in any public data source and run read-only SQL against them. Open Data, pick a source, select Query Builder, write a query and select Execute.

Who can do this: Owner, Admin and Member. About roles

On this page

Use the Query Builder when you want to see the raw tables behind an answer, check a number yourself or write your own SQL. Every source has its own Query Builder, and a query runs against one source at a time.

Open a source

  1. Step 1: Select Data in the left rail.

  2. Step 2: Under Public Data, select a source such as IPEDS, then Query Builder.

    You can also select a source card on Overview.

  3. Step 3: Check the strip above the editor.

    It shows Last updated and Frequency for the source.

Browse a table

  1. Step 1: Find the table in the left panel.

    The panel header shows the source name and the number of tables. The panel is hidden on phone-sized screens.

  2. Step 2: Select the table name.

    Clema shows its rows with a row and column count.

Run a query

  1. Step 1: Type your SQL in Query Editor.

    The editor highlights SQL, suggests table names from the current source as you type and supports find.

  2. Step 2: Select Execute, or press Cmd+Enter on Mac or Ctrl+Enter on Windows.

    The button reads Executing... and the editor is locked while the query runs.

  3. Step 3: Read Query Results.

    The header shows rows, columns and run time in milliseconds. Results come back 100 rows per page.

  4. Step 4: To stop a running query, select Cancel.

  5. Step 5: To empty the editor, select Clear.

Limits

LimitDetail
Read-onlyOnly queries that read data are accepted. You cannot insert, update or delete.
One source per queryA query sees the tables of the source you opened.
Page size100 rows per page.
Saved queriesNot available. Keep queries you want to reuse in your own notes.
ExportThere is no download or export button for results.
HistoryLogs shows the last 100 executions. See query logs.

The source is part of the page address, for example /data/query?source=ipeds. Send that link to a teammate in your organization to open the same source. The link does not carry your query text.

Troubleshooting

"Query cannot be empty"
Type a query in the editor before selecting Execute.
"The request timed out. Please try again."
Narrow the query. Add a WHERE filter on year or institution, select fewer columns or add a LIMIT, then run it again.
An Error: box with a database message
The message comes from the database. Check table and column names against the left panel and Data Definitions.
"No tables available"
Reload the page. If the list stays empty, contact support.
You are sent to chat when you open the Data area
Your role is Data Requester, which does not include the Data area. Ask an Owner or Admin to change your role. See roles and permissions.

Common questions

Can I save a query in the Query Builder?
No. There are no saved queries. The Logs view keeps the last 100 executions, so you can find a recent query there and copy it.
Can I export query results to CSV?
Not from the Query Builder. Ask the question in chat instead, where charts offer Download CSV.
Can the Query Builder write SQL for me from plain English?
No. The Query Builder runs the SQL you type. To ask in plain English, use chat, then open Sources under the answer to see the SQL Clema wrote.
Can I change the data?
No. The Query Builder only accepts read-only queries.

Related articles