Skip to main content
Use the Peliqan SQL query editor to write SELECT queries on any data source, including JOIN queries that join data from different sources, UNION etc. On save, the SQL query will automatically be beautified. The query will be executed two times, the first time with a “LIMIT 1” added to discover the schema (columns) of the result, the second time to fetch a page of data (default 3000 rows). The Grid view in Peliqan will automatically apply paging when you scroll. You can insert table names from the right pane. You can hover over a table in the SQL editor to see the structure (columns, example value etc.) of the referenced table. SQL editor table hover info

Referencing tables and views in queries

Referencing a table

Examples:

Referencing another query

When you write a SELECT query and save it, it becomes a “table” in Peliqan. The query is ephemeral, which means it will be executed each time the table is opened. You can reference another SQL query inside a new SQL query. Example where an SQL query references another SQL query with name my_query_name:
Peliqan will convert this into a CTE (common table expression). For example let’s say that the SQL query with name my_query_name was SELECT id, LOWER(name) FROM my_table. The above final query that will be executed will be:

Referencing a Grid view

It is possible to reference a grid view that is defined on a table in the Grid view interface: Grid view interface Grid views are useful to e.g. filter the data. A Grid view is appended to the table name using an underscore. Example:

Run SQL queries on Peliqan’s federated query engine (Trino)

Optionally you can run your SQL queries on Peliqan’s built-in federated query engine Trino, in order to join data between separate databases and data warehouses. Enable Trino under the Settings icon of your query in the SQL query editor: Enable Trino setting Click here for all Trino SQL functions

Common examples

Filter records after a specified date:
Cast a column to a different format: