SQL Editor
// run live SELECT queries · Ctrl+Enter to execute
About the SQLMentor editor
The SQLMentor editor runs queries entirely in your browser using sql.js — SQLite compiled to WebAssembly. There's no server round-trip, no signup, and no data leaves your machine. It's the fastest way to practise SQL on a real schema without installing Oracle, PostgreSQL, MySQL or SQL Server locally.
Supported dialects
The editor simulates four dialects: Oracle SQL,
MySQL, PostgreSQL, and
Microsoft SQL Server (T-SQL). Dialect-specific syntax
(like Oracle's ROWNUM, PostgreSQL's :: casts,
or T-SQL's TOP n) is translated to SQLite-compatible SQL on
the fly. All four share a common Oracle HR schema so you can
compare dialects on the same data.
The HR sample schema
Eleven tables ship pre-loaded: employees,
departments, jobs, job_history,
locations, countries, regions,
dependents, salaries, projects,
and project_assignments. The schema is rich enough to
practise joins, subqueries, CTEs, window functions, and aggregation
without contrived examples.
Tips for getting the most out of the editor
- Press Ctrl+Enter to run the current query.
- Use the Quick examples chips below the editor to load common patterns.
- Switch dialects to see how the same logic renders in Oracle, MySQL, PostgreSQL, and T-SQL.
- The schema cards at the bottom of the page show every column — handy when writing joins.
- For deeper learning, jump to the Oracle SQL tutorial or the PostgreSQL tutorial.
Not sure what to write?
Work through the 30 SQL practice exercises with answers — beginner to advanced tasks on this exact HR schema, each with a one-click link that loads and runs the solution right here in the editor.