trdsql

Execute SQL queries directly on CSV, JSON, YAML, and other data formats

brewmacoslinux
Try with needOr install directly
Source

About

CLI tool that can execute SQL queries on CSV, LTSV, JSON, YAML and TBLN

Commands

trdsql

Examples

Query a CSV file with SQL$ trdsql -csv 'SELECT * FROM data.csv WHERE age > 30'
Convert JSON to CSV using SQL$ trdsql -ijson -ocsv 'SELECT name, email FROM input.json' > output.csv
Join and filter data from multiple CSV files$ trdsql -csv 'SELECT a.id, a.name, b.score FROM a.csv a JOIN b.csv b ON a.id = b.id WHERE b.score > 80'