TextQL instructions

This commit is contained in:
def 2018-04-12 23:27:32 +02:00
parent d77d18c98a
commit 7973d55371

View file

@ -126,3 +126,22 @@ $ cmake -DMYSQL=ON ..
$ make
$ ./DDNet-Server -f mine.cfg
```
Importing the official DDNet Database into SQLite using TextQL
--------------------------------------------------------------
```bash
$ wget https://ddnet.tw/stats/ddnet-stats.zip
$ unzip ddnet-stats
$ cd ddnet-stats
$ go get -u github.com/dinedal/textql/...
$ textql -console -header maps.csv race.csv teamrace.csv
sqlite> select sum(Points) from race join maps on race.Map = maps.Map where race.Name = "nameless tee";
48849
sqlite> .save ddnet.sqlite
sqlite> ^D
$ ls -lha ddnet.sqlite
-rw-r--r-- 1 deen deen 200M Apr 12 23:26 ddnet.sqlite
$ sqlite3 ddnet.sqlite
sqlite>
```