Skip to content

JamesOwenHall/sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sql

Build Status

This project is a command line utility for running SQL queries over local files.

Usage

Select individual columns
sql 'select id, name, balance from "fixtures/accounts.json"'
id	name	balance
1000	Alice	15.5
1001	Bob	-50.08
1002	Charlie	0
1003	Denise	-1024.64
Order columns
sql 'select id, name, balance from "fixtures/accounts.json" order by balance'
id	name	balance
1003	Denise	-1024.64
1001	Bob	-50.08
1002	Charlie	0
1000	Alice	15.5
Run aggregate queries
sql 'select sum(balance) from "fixtures/accounts.json"'
sum(balance)
-1059.22
Filter rows
sql 'select sum(balance) from "fixtures/accounts.json" where frozen'
sum(balance)
-1074.72

Supported formats

  • CSV
  • JSON (line-separated objects only)

Releases

No releases published

Packages

No packages published

Languages