How to Use the CSV SQL
Step 1 : Paste or type your CSV data in the input box. At left side you will see total columns and rows parsed.
Step 2 : Specify the separator used in the csv.
Step 3 : Design your SQL query to get the desired output, follow RBQL syntax for the query. Use javascript functions instead of sql functions.
Step 4 : Click on the Execute button, if any error in the query it will be shown in below of Execute button.
FAQs
What is CSV SQL?
CSV SQL is a tool that helps you to query CSV data using SQL queries. You can use select, filter, sort, group, distinct, javascript function, and many more in your SQL query. Also allow you to update the data in the CSV.
Supported features
- SELECT
- UPDATE
- WHERE
- ORDER BY [ DESC | ASC ]
- GROUP BY
- DISTINCT
- GROUP BY
- TOP N
- LIMIT N
- AS
- JavaScript functions
Examples
UPDATE SET price = price * 1.1 WHERE price > 100
SELECT name.toLocaleLowerCase(), address.split(",")[0] AS city
SELECT MIN(parseInt(price)) AS min_price, MAX(parseInt(price)) AS max_price
SELECT * ORDER BY price, date DESC
SELECT * WHERE price > 100
SELECT sum(ammount) GROUP BY product_id