Query loaded files with SQL
For file-based data, Database Analyze Tools covers CSV, TSV, JSON, and JSONL files in your browser. SQL Query Tool for CSV and JSON loads each file as a named table, lets you inspect the data with read-only SQL, and keeps the work local with no upload.
Load files as named tables
Open SQL Query Tool for CSV and JSON when the data is in files. Each loaded file gets a table name that you can use in a query. Work with one table, or load multiple files and connect related records with JOIN. The page accepts these file types:
- Load CSV, TSV, JSON, or JSONL files as named tables.
- Write read-only SQL with SELECT, WHERE, JOIN, GROUP BY, HAVING, ORDER BY, aggregates, or LIMIT.
- Preview the query result before selecting an export format.
Filter and sort the result
Use WHERE to keep matching rows, GROUP BY to organize records for grouped calculations, and LIMIT to cap the returned rows. Add ORDER BY when the preview needs a defined order. Aggregate expressions can calculate values across grouped or ungrouped data.
This example filters a named table, sorts the matching rows, and limits the preview:
SELECT * FROM orders
WHERE status = 'paid'
ORDER BY created_at
LIMIT 10;
Preview: matching rows from orders, ordered by created_at, up to 10 rows.
The preview shows the query result before you export it. Available formats are CSV, JSON, and SQL text. The SQL operation is read-only, so the page queries loaded files instead of changing their source tables.
Choose the page for your data
Use Database Tools for the wider database category, including SQL schema comparison or Parquet comparison and conversion. Use SQL Query Tool for CSV and JSON when the data is in CSV, TSV, JSON, or JSONL files and you need to query those files as named tables.
Use cases for the query page
- Inspect a subset of a CSV export with
WHEREandORDER BY, then export the result for another report. - Load JSON and JSONL files as separate named tables and use
JOINto examine related records. - Calculate grouped totals with
GROUP BYand an aggregate, then export the result as CSV or JSON.
Frequently asked questions
Which page should I use for a CSV or JSON file?
Use SQL Query Tool for CSV and JSON. It loads CSV, TSV, JSON, or JSONL files as named tables and lets you run read-only SQL against them.
Can I run one SQL query across multiple files?
Yes. Load multiple files as named tables and use JOIN when the tables contain related data. The query page also supports SELECT, WHERE, GROUP BY, HAVING, ORDER BY, aggregates, and LIMIT.
Are files uploaded by Database Analyze Tools?
The category handles data locally in your browser, with no upload. SQL Query Tool for CSV and JSON uses the loaded files as tables for read-only queries.
What can I export after analyzing a file?
You can preview the query result and export it as CSV, JSON, or SQL text. The query is read-only, so this workflow does not change the source tables.