NewThe ManyPI MCP Server is now live

SQL Query Playground

A free SQL editor that runs SELECT queries on any CSV file inside the browser. No database to install, no upload and no account, so a class can write its first query in the first minute.

Web toolBachelor +2CC BY 4.0

What you will learn

  • Write SELECT queries with WHERE, GROUP BY, HAVING and ORDER BY
  • Ask questions of a real CSV file without setting up a database
  • Read an error message that names the feature it does not support

What it does

  • Loads a CSV file from your device, or a built-in sample table of 30 orders (click Try sample data). The table is called data.

  • Runs SELECT queries with DISTINCT, WHERE (including LIKE, IN, BETWEEN and IS NULL), GROUP BY, HAVING, ORDER BY, LIMIT and OFFSET, and the aggregates COUNT, SUM, AVG, MIN, MAX and GROUP_CONCAT.

  • Works out each column's type from its values, so number comparisons and sums behave as expected.

  • Runs entirely in the page. The file is never uploaded, and nobody needs an account, which keeps it usable in schools with strict data protection rules.

What it leaves out

It queries one table. JOIN, subqueries, window functions and UNION are rejected with a clear error that names the missing feature, and so is anything that writes data. That makes it a good first step before a full database system, not a replacement for one.

A first query

First query
SELECT country, COUNT(*) AS orders
FROM data
GROUP BY country
ORDER BY orders DESC

On the sample data this lists nine countries: Germany first with 6 orders, then the Netherlands and the United States with 5 each.

Ideas for class

  • A first SQL lesson. The 45-minute exercise on sales data has six tasks with solutions.

  • Open data. Download a CSV from an open data portal and let learners ask their own questions of it.

  • Spreadsheet versus SQL. Answer the same question once with a pivot table and once with a query, then compare which one you could still read a week later.

Using this page

The tool is free to use. This description and the ideas on it are licensed under CC BY 4.0.

Reuse this material

CC BY 4.0

You may copy, adapt and share it, also commercially, as long as you credit ManyPI and link back.

"SQL Query Playground" by ManyPI (https://manypi.com/edu/sql-query-playground), licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)