Querydrill

PostgreSQL playground

Write SQL and run it right here. A small database is ready to query, and you can create your own tables too. It runs in your browser: no sign-up, nothing to install, and nothing you type is sent anywhere.

Ctrl or Cmd + Enter

What you can do here

Which SQL is this?

The playground runs PostgreSQL. The core of SQL (SELECT, WHERE, JOIN, GROUP BY, HAVING, subqueries, window functions) is the same in MySQL and SQL Server. Date and string functions differ between databases; here dates are real DATE values and you work with them using to_char, EXTRACT and date arithmetic such as order_date + 7.

Want to be checked, not just run?

The playground runs whatever you write. To find out whether a query is actually right, the practice exercises give you a task and check your answer on visible and hidden data, and the free SQL practice test scores you on ten questions in 15 minutes. The SQL cheat sheet has the syntax in one place.

Practice SQL with instant checking