CSV Query Sandbox
Run a small SELECT/WHERE/LIMIT query against pasted CSV.
Overview
The CSV query sandbox runs a small SQL-like query against a pasted CSV — SELECT specific columns, filter with WHERE, sort with ORDER BY, and trim with LIMIT. It's a lightweight way to drill into a dataset without leaving the browser.
Analysts inspecting an export, support engineers looking at a customer's CSV, and developers triaging fixture data use a csv sql query runner when SQL is the most natural way to express a filter. It's faster than opening Excel and friendlier than memorising awk syntax.
How it works
The engine parses a simplified subset of SQL: SELECT col1, col2, * projections; WHERE with =, !=, <, <=, >, >=, LIKE, IN, IS NULL, IS NOT NULL, plus AND/OR/NOT; ORDER BY col [ASC|DESC] with multiple sort keys; and LIMIT n OFFSET m. Aggregations and joins are not supported — for those, use the dedicated CSV joiner or pivot table tool.
CSV rows are parsed per RFC 4180. Values are compared numerically if both sides parse as numbers under invariant culture, otherwise as strings. LIKE patterns use SQL wildcards (% for any run, _ for any single character).
Examples
SELECT name, total FROM csv WHERE status = 'paid' AND total > 50 ORDER BY total DESC
Input CSV:
name,status,total
Alice,paid,120
Bob,pending,40
Carol,paid,90
Dave,paid,30
Output:
name,total
Alice,120
Carol,90
SELECT * FROM csv WHERE email LIKE '%@example.com' LIMIT 5
FAQ
Why does the table have to be called csv?
The single-table sandbox always exposes the pasted data as csv. Renaming isn't supported, but it's also the only name you'll ever need.
Are aggregations like COUNT and SUM supported?
Not in this sandbox. Use the CSV column statistics tool for a quick distinct/min/max/avg summary, or the pivot table builder for grouped aggregations.
How are quoted strings handled?
SQL string literals use single quotes ('paid'). Escape an embedded quote by doubling it: 'O''Brien'. Double-quoted identifiers are accepted for column names with spaces.