Query CSV with SQL

Run SQL on a CSV file right in your browser: filter, group, sort and summarize, then download the result.

FreeNo sign-upPrivate — your file never leaves your device
Ctrl + Enter also runs it.
Result

How to use the CSV SQL Query

  1. Load your CSVOpen or paste a CSV. It becomes a table called data, and column names are cleaned up (spaces become underscores).
  2. Write a queryType standard SQL such as SELECT, WHERE, GROUP BY, ORDER BY and LIMIT, or click an example.
  3. Run and downloadPress Run query (or Ctrl + Enter), check the result table, and download it as a CSV.

Example

The sample query groups orders by city: Dhaka has 4 orders and 2,001.47 revenue, ahead of Sylhet and Chattogram.

SELECT DISTINCT category FROM data lists the 4 categories: Electronics, Clothing, Home, Books.

Frequently asked questions

Which SQL features work?

Most everyday SQL: SELECT, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, DISTINCT, JOIN, sub-queries, CASE and functions like COUNT, SUM, AVG, MIN, MAX, ROUND, UPPER and LENGTH. It is powered by the open-source AlaSQL engine.

How are my column names used?

Spaces and symbols become underscores, so “Unit Price” becomes unit_price. The full list is shown under the query box. Numeric columns are stored as numbers so SUM and comparisons work.

Is my file uploaded to a database?

No. The SQL engine runs inside your browser, and your data never leaves your device.

Popular posts from this blog

Character Counter

Speech to Text Online

Keyboard Tester