Features

SQL console

Ask in words, get SQL, and run it over a conversation's datasets a page at a time.

Sometimes you want the rows themselves, not a written answer — a list to check, a table to export, a query you can tweak. The SQL console turns a question in plain words into SQL (the language databases are queried in), tells you how it understood you, and lets you edit and run the query over the datasets picked in your conversation. You don’t need to write SQL yourself, though you can.

What you’ll need

  • The SQL console, if your plan includes it. On other plans the SQL button is greyed and says it isn’t included in your plan when you click it.
  • Datasets to read — the ones attached to your conversation. See Datasets. A conversation with no data has no SQL to run, so add some first with +.

Open it

SQL is not in the left sidebar. It opens from a conversation that has data:

  • In a conversation: click SQL in the side panel’s Data in play card, or the terminal icon (>_) in the conversation’s title bar. The console opens in a panel beside the conversation, over the datasets attached to it. With one dataset, SQL sits beside its Explore link.
  • On a new conversation: once you’ve attached data, SQL appears beside the data chip in the message box row.
  • Datasets on a laptop: tables read from your own computer don’t offer SQL or Explore.

Use it

  1. The Datasets bar shows what the console reads. Click Change to pick others with the same picker as the message box; the console’s pick is its own and leaves your conversation’s alone. Click a dataset to insert it into your query.
  2. Type a question — for example “orders per week by channel, with the refund share” — and click Draft. Each step shows as it runs, then folds to one line. The first question on a new pick can take a minute.
  3. Read how it understood you: Read as, what is counted, Words to columns, what it Assumed, what it Could also mean, and what your data can’t say. If the datasets you picked don’t hold what you asked but another of yours does, the console says so; click Add and redraft to use it.
  4. Edit the SQL if you like, click Check, then Run (or press ⌘/Ctrl+Enter). Count tells you how many rows the query has in all.
  5. While a draft, check, count or run is working, Stop gives up on it.

See it as a chart

Results come a page at a time, under the query. Switch Table to Chart to draw the rows as a Bar, Line or Area chart, and choose the x column and the y columns to draw. A result of a single number is shown as that one figure. The chart draws the rows read so far; when there are more, it says so — group your query (GROUP BY) to chart all of it.

How to tell it worked

Rows appear under the query, a page at a time, with Load more for the next page, and Count tells you how many there are in all.

Good to know

  • A query is one read-only SELECT (a WITH is allowed), over the picked datasets only, joining several of them. Read-only means it can look at your data but never change it.
  • Queries that would be too expensive are refused, and the console tells you why and how to fix it.
  • Paging stops after a set number of rows. If you need more, narrow the query or aggregate it (count or sum by group) instead. The numbers are in Current limits.
  • A query reads each dataset at the same version the conversation reads, so the console and your answers agree.
  • Download CSV appears under the results only where your organization allows exports — see Data exports.
  • Every query you run is kept under Queries and SQL in the Data menu, where you can star, title and rerun it.

Still stuck? support@bumbleb.co

BumbleB Ask your business anything. Start free