Skip to content

SQL over CSV

Runs SQL against dropped CSV or TSV files in the browser — SELECT, WHERE, GROUP BY/HAVING, ORDER BY, LIMIT, CASE and a two-table JOIN — with the grammar on the page.

Drop a CSV and query it with SQL, in the browser, with nothing installed and nothing uploaded. Two files gives you a JOIN. The supported grammar is printed on the page, which answers "why did that not work" faster than an error message can.

🔒 Runs entirely in your browsersqlquerycsvanalysis

Drop CSV or TSV files (more than one is fine)

Read in this tab. Nothing is uploaded. Files from Korean, Japanese, Chinese and Western Excel (CP949, Shift_JIS, GBK, Windows-1252) are recognised.

SQL

Syntax it accepts

SELECT [DISTINCT] column, expression [AS alias], table.* , *
FROM table [alias]
[ [INNER|LEFT] JOIN table [alias] ON condition ]      -- two tables at most
[WHERE condition]
[GROUP BY expression, …] [HAVING condition]
[ORDER BY expression|alias|number [ASC|DESC], …]
[LIMIT n [OFFSET m]]

conditions:  = <> < <= > >=   AND OR NOT   IN (…)   LIKE 'Seoul%'   BETWEEN a AND b   IS [NOT] NULL
expressions: + - * / %   || (string join)   CASE WHEN … THEN … ELSE … END   CAST(x AS INTEGER|REAL|TEXT)
aggregates:  COUNT(*) COUNT(DISTINCT x) SUM AVG MIN MAX GROUP_CONCAT(x, ',')
functions:   UPPER LOWER LENGTH TRIM LTRIM RTRIM SUBSTR(s, start, length) LEFT RIGHT REPLACE INSTR CONCAT
             COALESCE IFNULL NULLIF IIF(condition, a, b) ROUND(x, places) ABS FLOOR CEIL SQRT POWER MOD TYPEOF
names:       Korean column names work as they are; quote a name with a space as "name" or `name`   -- comment, /* comment */

NULL is never true in any comparison, LIKE ignores case, and dividing by zero gives NULL. In an aggregate query a column not in the GROUP BY takes its value from the first row of the group, the same as SQLite. There are no subqueries and no window functions.

Files are read inside this tab and never uploaded. Column types are inferred from the file, so a numeric column compares as numbers and a text column compares alphabetically.

How to use it

  1. Drop one or more files

    Each becomes a table named after the file. Rename it in the list above the editor if the name is awkward to type.

  2. Write the query

    SELECT, WHERE, GROUP BY with HAVING, ORDER BY, LIMIT, CASE and a two-table JOIN. Ctrl+Enter runs it. The example buttons under the box fill in a working query against your own table names.

  3. Read the error position

    A failed query reports the line and column where the parser stopped, which is usually one token past the actual mistake.

  4. Export the result

    As CSV with a BOM for Excel, or as JSON for anything that reads JSON.

Common questions

Are subqueries and window functions supported?

No. This is a SQL subset written for this site, not SQLite compiled to WebAssembly: SELECT with WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, CASE and a two-table JOIN, and that is the whole of it. The grammar panel is the exact list.

Does my data go to a server?

No. The parser and the evaluator both run in this tab. That is the reason the feature set is smaller than a real database’s, and it is also the reason you can point it at a file you would never upload.

Can I use Korean column names?

Yes, as they are. A name with a space in it needs quotes — either "double quotes" or backticks.

The error message is in Korean

The query engine’s twenty-five parse and evaluation messages are Korean only, because each is asserted word for word in its tests. The syntax panel beside the editor is written in both languages and covers the same ground.

Feed it from

Next

These accept what this tool produces, so the result can go straight in.