dinedal / textql

Execute SQL against structured text like CSV or TSV
MIT License
9.07k stars 300 forks source link

load multiple tables. #27

Closed mitoma closed 10 years ago

mitoma commented 10 years ago

usage.

$ cat user.csv
id,name
1,jhon
2,tom
3,bom

$ cat item.csv
user_id,name
1,WiiU
1,3DS
2,PS
2,PS2
2,PS3
2,PS4
3,Xbox

$ textql -header \
         -source user.csv,item.csv \
         -sql "select tbl0.name, tbl1.name from tbl0 join tbl1 on tbl0.id = tbl1.user_id"
jhon, 3DS
jhon, WiiU
tom, PS
tom, PS2
tom, PS3
tom, PS4
bom, Xbox