ElliboHelp Centre

Query tables

Write SQL over your workspace's tables to make a new table that stays up to date.

A query table is a new table made by a SQL query over other tables in the same workspace. It is worked out each time a report uses it, so it is always up to date, and it never counts toward your rows. Query tables are on the Standard plan and up.

Make a query table

  1. In a workspace choose Add data > Query table.
  2. Write a SELECT query. Use your tables' names as they appear in the workspace, in backticks if they contain spaces.
  3. Choose Run to see the first rows, then Save.

For example:

SELECT Region, SUM(Sales) AS Sales, SUM(Target) AS Target
FROM `Sales` JOIN `Targets` USING (Region)
GROUP BY Region

What you can write

  • One SELECT query, with JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, UNION and subqueries.
  • Only the tables of the same workspace, including other query tables.
  • The usual functions for text, numbers and dates.

Queries can't change data, read anything outside your workspace, or use other databases. A query that runs too long is stopped.

Good to know

  • Name every worked-out column with AS, so reports can use it.
  • If a table a query uses is paused by the plan, the query table pauses too.
  • On a plan without query tables, query tables stop working until you upgrade. They are kept.
Still need help?Write to us and we'll walk you through it.
Contact support