What it does
Each file you drop becomes a table named after the file. Query one, or join several, exactly as you would in a database.
SELECT c.city,
count(*) AS orders,
sum(s.amount) AS revenue
FROM sales_north s
JOIN customers c USING (customer_id)
GROUP BY c.city
ORDER BY revenue DESC; | city | orders | revenue |
|---|---|---|
| Pune | 2 | 2560 |
| Berlin | 1 | 1450 |
How to query a CSV file with SQL
- Drop one or more files above. CSV, TSV, Excel, Parquet and JSON all work. Each becomes a table:
sales 2026.csvbecomessales_2026. - The left panel lists every table with its columns and types. Click a column name to insert it into the query.
- Write your query, or start from one of the suggested examples, and press Run (or Ctrl + Enter).
- Download the result as CSV or Excel.
Useful queries to start from
Count rows per value, the SQL version of a pivot table:
SELECT city, count(*) AS n
FROM customers
GROUP BY city
ORDER BY n DESC; Find rows in one file with no match in another, a check VLOOKUP makes painful:
SELECT *
FROM orders o
WHERE NOT EXISTS (SELECT 1 FROM customers c WHERE c.customer_id = o.customer_id); Running total by date, using a window function:
SELECT date, amount,
sum(amount) OVER (ORDER BY date) AS running_total
FROM sales; Find duplicate keys:
SELECT email, count(*) AS copies
FROM contacts
GROUP BY email
HAVING count(*) > 1; Handy DuckDB extras
SELECT * EXCLUDE (notes, internal_id) FROM treturns every column except the ones listed.GROUP BY ALLgroups by every column that isn't an aggregate, so you don't have to repeat them.SUMMARIZE tprofiles every column: type, min, max, distinct count and percentage of empty values.strptime(date_text, '%d/%m/%Y')turns text dates in any format into real dates.
Why SQL instead of Excel?
For one-off sums, Excel is fine. SQL wins when files are large, when you need to join two or three files, or when you'll repeat the same analysis every month. You keep the query text and run it again on next month's export.
Questions
Which SQL does it use?
DuckDB SQL, which is close to PostgreSQL. SELECT, WHERE, GROUP BY, JOIN, window functions, CTEs (WITH …) and most familiar functions work. A few extras help with files, like SELECT * EXCLUDE (column) and GROUP BY ALL.
Can I query several files together?
Yes. Drop several files and each one becomes its own table, named after the file. You can JOIN them like tables in any database, for example orders with customers.
Is my data uploaded to a server?
No. DuckDB, the database engine, runs inside this page. Your files are read from your disk by your browser and the queries run on your computer. The engine itself (about 30 MB) is downloaded from a public CDN the first time, then cached.
Can I change the data?
You can create new tables from queries (CREATE TABLE … AS SELECT …) and download any result as CSV or Excel. Your original files are never modified.
How big can the files be?
Large CSV and Parquet files are fine: several gigabytes on a normal laptop, because DuckDB reads them in chunks. Results shown on screen are limited to the first 1,000 rows, but downloads include every row.