omni compilerGet the app

SQL · Android 7.0+ · free

An SQL runner for Android: SQLite, PostgreSQL, MariaDB and more

Practise SQL on your phone against the real thing. omni compiler runs your script on SQLite, PostgreSQL, MariaDB or DuckDB (and commands on Redis), prints the result rows, and can judge a query's output against what you expect. Scripts are files in a project on your device, so a schema and its queries live together.

SQL on a phone, done properly

  • Real database engines

    Each run starts a fresh engine: create tables, insert rows and query them in one script. SQLite, PostgreSQL, MariaDB, DuckDB and Redis are included.

  • Results as tables

    SELECT output is printed as rows you can read on a phone; errors from the engine show the statement that failed.

  • Judge your queries

    Add test cases whose expected output is the rows a query should print and get AC, WA, TLE, MLE, RE, CE verdicts, the same way as for a program.

  • Schema and queries together

    Keep setup scripts and exercises as files in one project, search across them, and import a repository of exercises from GitHub or GitLab.

Try it with a test case

Paste this into query.sql, add a test case with the input below, and run. Prints two rows: north with a total of 10, and south with a total of 5.

CREATE TABLE sales (region TEXT, amount INTEGER);
INSERT INTO sales VALUES ('north', 4), ('south', 5), ('north', 6);
SELECT region, SUM(amount) AS total FROM sales GROUP BY region ORDER BY region;
Test input
(none)

Questions

Does the database persist between runs?

No. Every run starts with an empty engine, which keeps runs reproducible and fast. Put the CREATE and INSERT statements at the top of the script, or in a file you reuse.

Which SQL dialect should I practise for interviews?

Most interview questions are written for PostgreSQL or MySQL-style SQL; MariaDB is MySQL-compatible. Run the same query on two engines to see where they differ.

Is the SQL compiler free?

Yes. omni compiler is free to download and use, with ads, and you can start as a guest without an account.

Can I run SQL offline on my phone?

You can write and edit offline: projects are stored on your phone. Running needs a connection because the code executes in an isolated sandbox on our servers; runs you start offline are queued and sent when you reconnect.

Which Android versions does the SQL compiler support?

Android 7.0 and newer, on phones and tablets. Tablets get a split view to edit two files side by side.

Other languages

65 languages in all; see every language page.

Start coding on your phone.

Download omni compiler and run your first program in seconds.