SQL Playground
Write real SELECT queries against any dataset here and get results instantly — joins, aggregates, GROUP BY, HAVING and ORDER BY, with plain errors for the things it does not support.
Loading…
About this tool
A small SQL engine written for this site. It supports the shape of query you actually write in an interview or a first pass at a dataset: projection, filtering, grouping, aggregates, ordering, limits, and inner joins across the dataset library. It tells you plainly when you have used something it cannot do, rather than silently returning the wrong answer.
Worth knowing
- Every dataset is a table named after its slug, with hyphens turned into underscores.
- Aggregates supported: count, sum, avg, min, max, count(distinct …).
- It is deliberately strict. A query that runs here will run in Postgres; the reverse is not guaranteed.