Tutorials · CSV and JSON

How to query CSV and JSON files

Use familiar SQL to inspect structured files without first loading them into a database.

Inspect the available columns

SELECT TOP 25 *
FROM 'C:\Data\orders.csv';

Group and summarize

SELECT status, COUNT(*) AS orders,
  SUM(amount) AS total_amount
FROM 'C:\Data\orders.csv'
GROUP BY status
ORDER BY total_amount DESC;

Use the same workflow for JSON

Select the JSON provider, inspect a sample and confirm how nested data is exposed.