Runtime: SQLite 3.27.2

SQL Online Editor & Query Runner (SQLite 3.27.2)

Design tables, seed relational rows, and test SQL queries online with Compilra’s SQLite 3.27.2 engine. Practice INNER and LEFT JOINs, CTEs, window functions, and GROUP BY aggregates with column-aligned terminal results and zero server setup.

Why Use Compilra’s SQL Online Editor?

Full SQLite 3.27.2 Engine

Run DDL and DML statements, foreign keys, indexes, subqueries, CTEs (WITH), and analytical window functions in an isolated database.

Multi-Table JOINs & Aggregations

Define normalized tables, insert sample datasets, and verify INNER/LEFT JOINs, GROUP BY, and HAVING queries in one script.

Formatted Tabular Query Output

Use .headers on and .mode column to inspect crisp, aligned query result tables without provisioning any database server.

How to Use Compilra’s SQL Online Editor

Design schemas and test SQL queries in four quick steps.

Step 01

Create Tables & Seed Data

Write CREATE TABLE and INSERT INTO statements inside the SQL editor or pick a starter template.

Step 02

Enable Table Formatting

Keep .headers on and .mode column (included in templates) for readable column-aligned output.

Step 03

Execute Your SQL Queries

Click Run Code to run the entire script against a fresh, ephemeral SQLite 3.27.2 instance.

Step 04

Inspect Query Results

Review returned rows, aggregates, or SQLite syntax diagnostics in the terminal panel.

Worked Example: Relational JOIN & Aggregation in SQLite 3.27.2

Create normalized tables, insert sample records, and return column-aligned grouped totals.

Source CodeSQLite 3.27.2
.headers on
.mode column

CREATE TABLE customers (id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE orders (id INTEGER PRIMARY KEY, customer_id INTEGER, amount REAL);

INSERT INTO customers VALUES (1, 'Alice'), (2, 'Bob');
INSERT INTO orders VALUES (101, 1, 120.0), (102, 1, 45.0), (103, 2, 85.0);

SELECT c.name AS customer, COUNT(o.id) AS orders, SUM(o.amount) AS total
FROM customers c
JOIN orders o ON c.id = o.customer_id
GROUP BY c.id, c.name
ORDER BY total DESC;
Verified Output (Stdout)
customer    orders      total     
----------  ----------  ----------
Alice       2           165.0     
Bob         1           85.0      

Each execution runs against an isolated ephemeral SQLite 3.27.2 database initialized from your script.

Frequently Asked Questions

Which SQL engine powers Compilra’s online database editor?

Compilra uses SQLite 3.27.2, supporting relational table DDL, DML, CTEs (Common Table Expressions), window functions, and subqueries.

Can I create multiple tables and run JOIN queries?

Yes. You can define multiple CREATE TABLE statements, populate them with INSERT INTO rows, and execute INNER, LEFT, and CROSS JOIN queries in a single script.

Can I create indexes and primary/foreign key constraints in SQLite?

Yes. CREATE INDEX statements, PRIMARY KEY, UNIQUE, CHECK, and FOREIGN KEY constraints are supported by SQLite 3.27.2.

Does Compilra support Common Table Expressions (CTEs) and window functions?

Yes. You can write recursive and non-recursive CTEs using WITH clauses as well as analytical window functions like ROW_NUMBER(), RANK(), and OVER(PARTITION BY).

Is my database state persistent across sessions?

Each execution initializes a clean, isolated ephemeral SQLite database instance based on your script, ensuring repeatable and reliable query testing.

Does Compilra display tabular query results with column headers?

Yes. Query results are formatted with visible column headers and aligned rows for clear database output inspection.

Ready to write and run SQL queries?

Open Compilra’s SQLite 3.27.2 editor and test relational joins, CTEs, and schemas right away.

Open SQL Editor